Commit 7cee360
Revert "mm: vmscan: make memcg slab shrink lockless"
This reverts commit caa0532.
Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec
test case [1], which is caused by commit f95bdb7 ("mm: vmscan: make
global slab shrink lockless"). The root cause is that SRCU has to be
careful to not frequently check for SRCU read-side critical section exits.
Therefore, even if no one is currently in the SRCU read-side critical
section, synchronize_srcu() cannot return quickly. That's why
unregister_shrinker() has become slower.
After discussion, we will try to use the refcount+RCU method [2] proposed
by Dave Chinner to continue to re-implement the lockless slab shrink. So
revert the shrinker_srcu related changes first.
[1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/
[2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/
Link: https://lkml.kernel.org/r/20230609081518.3039120-7-qi.zheng@linux.dev
Reported-by: kernel test robot <yujie.liu@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Kirill Tkhai <tkhai@ya.ru>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent d6ecbcd commit 7cee360
1 file changed
Lines changed: 19 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 213 | + | |
| 214 | + | |
228 | 215 | | |
229 | 216 | | |
230 | 217 | | |
| |||
265 | 252 | | |
266 | 253 | | |
267 | 254 | | |
268 | | - | |
| 255 | + | |
269 | 256 | | |
270 | 257 | | |
271 | 258 | | |
| |||
351 | 338 | | |
352 | 339 | | |
353 | 340 | | |
354 | | - | |
355 | 341 | | |
356 | | - | |
357 | | - | |
| 342 | + | |
| 343 | + | |
358 | 344 | | |
359 | 345 | | |
360 | 346 | | |
361 | 347 | | |
362 | 348 | | |
363 | | - | |
| 349 | + | |
364 | 350 | | |
365 | 351 | | |
366 | 352 | | |
| |||
374 | 360 | | |
375 | 361 | | |
376 | 362 | | |
| 363 | + | |
377 | 364 | | |
378 | 365 | | |
379 | 366 | | |
| |||
407 | 394 | | |
408 | 395 | | |
409 | 396 | | |
410 | | - | |
| 397 | + | |
411 | 398 | | |
412 | 399 | | |
413 | 400 | | |
| |||
416 | 403 | | |
417 | 404 | | |
418 | 405 | | |
419 | | - | |
| 406 | + | |
420 | 407 | | |
421 | 408 | | |
422 | 409 | | |
| |||
947 | 934 | | |
948 | 935 | | |
949 | 936 | | |
950 | | - | |
951 | 937 | | |
952 | 938 | | |
953 | 939 | | |
954 | 940 | | |
955 | 941 | | |
956 | | - | |
957 | | - | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
958 | 946 | | |
959 | 947 | | |
960 | 948 | | |
| |||
1004 | 992 | | |
1005 | 993 | | |
1006 | 994 | | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
1007 | 1000 | | |
1008 | 1001 | | |
1009 | | - | |
| 1002 | + | |
1010 | 1003 | | |
1011 | 1004 | | |
1012 | 1005 | | |
| |||
0 commit comments