Commit 0b0e898
mm/memcg: revert ("mm/memcg: optimize user context object stock access")
jira VULN-155863
cve-pre CVE-2023-53401
commit-author Michal Hocko <mhocko@suse.com>
commit fead2b8
upstream-diff The upstream commit is a revert of
5592711. This commit was obtained not
by cherry picking the upstream, but by directly reverting
d68ecae - the ciqlts8_6's backport of
5592711. This avoided the conflicts and also made more sense in general
Patch series "mm/memcg: Address PREEMPT_RT problems instead of disabling it", v5.
This series aims to address the memcg related problem on PREEMPT_RT.
I tested them on CONFIG_PREEMPT and CONFIG_PREEMPT_RT with the
tools/testing/selftests/cgroup/* tests and I haven't observed any
regressions (other than the lockdep report that is already there).
This patch (of 6):
The optimisation is based on a micro benchmark where local_irq_save() is
more expensive than a preempt_disable(). There is no evidence that it
is visible in a real-world workload and there are CPUs where the
opposite is true (local_irq_save() is cheaper than preempt_disable()).
Based on micro benchmarks, the optimisation makes sense on PREEMPT_NONE
where preempt_disable() is optimized away. There is no improvement with
PREEMPT_DYNAMIC since the preemption counter is always available.
The optimization makes also the PREEMPT_RT integration more complicated
since most of the assumption are not true on PREEMPT_RT.
Revert the optimisation since it complicates the PREEMPT_RT integration
and the improvement is hardly visible.
[bigeasy@linutronix.de: patch body around Michal's diff]
Link: https://lkml.kernel.org/r/20220226204144.1008339-1-bigeasy@linutronix.de
Link: https://lore.kernel.org/all/YgOGkXXCrD%2F1k+p4@dhcp22.suse.cz
Link: https://lkml.kernel.org/r/YdX+INO9gQje6d0S@linutronix.de
Link: https://lkml.kernel.org/r/20220226204144.1008339-2-bigeasy@linutronix.de
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Waiman Long <longman@redhat.com>
Cc: kernel test robot <oliver.sang@intel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit fead2b8)
Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>1 parent 0b444e7 commit 0b0e898
1 file changed
Lines changed: 28 additions & 72 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | 833 | | |
838 | 834 | | |
839 | 835 | | |
| |||
844 | 840 | | |
845 | 841 | | |
846 | 842 | | |
847 | | - | |
| 843 | + | |
848 | 844 | | |
849 | 845 | | |
850 | 846 | | |
| |||
2120 | 2116 | | |
2121 | 2117 | | |
2122 | 2118 | | |
2123 | | - | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
2124 | 2123 | | |
2125 | 2124 | | |
2126 | 2125 | | |
2127 | 2126 | | |
2128 | 2127 | | |
2129 | 2128 | | |
2130 | | - | |
2131 | | - | |
2132 | 2129 | | |
2133 | | - | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
2137 | | - | |
2138 | | - | |
2139 | | - | |
2140 | 2130 | | |
2141 | 2131 | | |
2142 | 2132 | | |
| |||
2146 | 2136 | | |
2147 | 2137 | | |
2148 | 2138 | | |
2149 | | - | |
| 2139 | + | |
2150 | 2140 | | |
2151 | 2141 | | |
2152 | 2142 | | |
2153 | 2143 | | |
2154 | | - | |
| 2144 | + | |
2155 | 2145 | | |
2156 | 2146 | | |
2157 | 2147 | | |
| |||
2161 | 2151 | | |
2162 | 2152 | | |
2163 | 2153 | | |
2164 | | - | |
2165 | | - | |
2166 | | - | |
2167 | | - | |
2168 | | - | |
2169 | | - | |
2170 | | - | |
2171 | | - | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | 2154 | | |
2200 | 2155 | | |
2201 | 2156 | | |
| |||
2262 | 2217 | | |
2263 | 2218 | | |
2264 | 2219 | | |
2265 | | - | |
2266 | | - | |
2267 | | - | |
| 2220 | + | |
2268 | 2221 | | |
2269 | 2222 | | |
2270 | 2223 | | |
| |||
3130 | 3083 | | |
3131 | 3084 | | |
3132 | 3085 | | |
| 3086 | + | |
3133 | 3087 | | |
3134 | | - | |
3135 | 3088 | | |
3136 | 3089 | | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
3137 | 3093 | | |
3138 | 3094 | | |
3139 | 3095 | | |
| |||
3184 | 3140 | | |
3185 | 3141 | | |
3186 | 3142 | | |
3187 | | - | |
| 3143 | + | |
3188 | 3144 | | |
3189 | 3145 | | |
3190 | 3146 | | |
3191 | 3147 | | |
| 3148 | + | |
3192 | 3149 | | |
3193 | | - | |
3194 | 3150 | | |
3195 | 3151 | | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
3196 | 3155 | | |
3197 | 3156 | | |
3198 | 3157 | | |
3199 | 3158 | | |
3200 | 3159 | | |
3201 | | - | |
| 3160 | + | |
3202 | 3161 | | |
3203 | 3162 | | |
3204 | 3163 | | |
3205 | 3164 | | |
3206 | | - | |
| 3165 | + | |
3207 | 3166 | | |
3208 | 3167 | | |
3209 | 3168 | | |
| |||
3259 | 3218 | | |
3260 | 3219 | | |
3261 | 3220 | | |
3262 | | - | |
3263 | | - | |
3264 | | - | |
3265 | | - | |
3266 | | - | |
3267 | | - | |
3268 | | - | |
| 3221 | + | |
| 3222 | + | |
3269 | 3223 | | |
3270 | 3224 | | |
3271 | 3225 | | |
| |||
3276 | 3230 | | |
3277 | 3231 | | |
3278 | 3232 | | |
| 3233 | + | |
3279 | 3234 | | |
3280 | | - | |
3281 | 3235 | | |
3282 | 3236 | | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
3283 | 3240 | | |
3284 | 3241 | | |
3285 | 3242 | | |
| |||
3295 | 3252 | | |
3296 | 3253 | | |
3297 | 3254 | | |
3298 | | - | |
| 3255 | + | |
3299 | 3256 | | |
3300 | 3257 | | |
3301 | 3258 | | |
| |||
6963 | 6920 | | |
6964 | 6921 | | |
6965 | 6922 | | |
6966 | | - | |
6967 | 6923 | | |
6968 | 6924 | | |
6969 | 6925 | | |
| |||
6972 | 6928 | | |
6973 | 6929 | | |
6974 | 6930 | | |
6975 | | - | |
| 6931 | + | |
6976 | 6932 | | |
6977 | 6933 | | |
6978 | 6934 | | |
| |||
7000 | 6956 | | |
7001 | 6957 | | |
7002 | 6958 | | |
7003 | | - | |
| 6959 | + | |
7004 | 6960 | | |
7005 | 6961 | | |
7006 | 6962 | | |
| |||
0 commit comments