Commit d6ecbcd
Revert "mm: vmscan: add shrinker_srcu_generation"
This reverts commit 475733d.
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.
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-6-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 1a554ec commit d6ecbcd
1 file changed
Lines changed: 4 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
| |||
818 | 817 | | |
819 | 818 | | |
820 | 819 | | |
821 | | - | |
822 | 820 | | |
823 | 821 | | |
824 | 822 | | |
| |||
840 | 838 | | |
841 | 839 | | |
842 | 840 | | |
843 | | - | |
844 | 841 | | |
845 | 842 | | |
846 | 843 | | |
| |||
950 | 947 | | |
951 | 948 | | |
952 | 949 | | |
953 | | - | |
954 | | - | |
| 950 | + | |
| 951 | + | |
955 | 952 | | |
956 | 953 | | |
957 | 954 | | |
958 | 955 | | |
959 | | - | |
960 | 956 | | |
961 | 957 | | |
962 | 958 | | |
963 | 959 | | |
964 | 960 | | |
965 | | - | |
966 | | - | |
| 961 | + | |
967 | 962 | | |
968 | 963 | | |
969 | 964 | | |
| |||
1009 | 1004 | | |
1010 | 1005 | | |
1011 | 1006 | | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | 1007 | | |
1018 | 1008 | | |
1019 | 1009 | | |
| |||
1053 | 1043 | | |
1054 | 1044 | | |
1055 | 1045 | | |
1056 | | - | |
| 1046 | + | |
1057 | 1047 | | |
1058 | 1048 | | |
1059 | 1049 | | |
| |||
1067 | 1057 | | |
1068 | 1058 | | |
1069 | 1059 | | |
1070 | | - | |
1071 | 1060 | | |
1072 | 1061 | | |
1073 | 1062 | | |
| |||
1080 | 1069 | | |
1081 | 1070 | | |
1082 | 1071 | | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | 1072 | | |
1089 | 1073 | | |
1090 | 1074 | | |
| |||
0 commit comments