Commit 200577f
memcg: objcg stock trylock without irq disabling
There is no need to disable irqs to use objcg per-cpu stock, so let's just
not do that but consume_obj_stock() and refill_obj_stock() will need to
use trylock instead to avoid deadlock against irq. One consequence of
this change is that the charge request from irq context may take slowpath
more often but it should be rare.
Link: https://lkml.kernel.org/r/20250514184158.3471331-8-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 0ccf180 commit 200577f
1 file changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1880 | 1880 | | |
1881 | 1881 | | |
1882 | 1882 | | |
1883 | | - | |
1884 | 1883 | | |
1885 | 1884 | | |
1886 | 1885 | | |
1887 | 1886 | | |
1888 | | - | |
| 1887 | + | |
1889 | 1888 | | |
1890 | 1889 | | |
1891 | 1890 | | |
1892 | 1891 | | |
1893 | 1892 | | |
1894 | | - | |
| 1893 | + | |
1895 | 1894 | | |
1896 | 1895 | | |
1897 | 1896 | | |
| |||
2874 | 2873 | | |
2875 | 2874 | | |
2876 | 2875 | | |
2877 | | - | |
2878 | 2876 | | |
2879 | 2877 | | |
2880 | | - | |
| 2878 | + | |
| 2879 | + | |
2881 | 2880 | | |
2882 | 2881 | | |
2883 | 2882 | | |
| |||
2888 | 2887 | | |
2889 | 2888 | | |
2890 | 2889 | | |
2891 | | - | |
| 2890 | + | |
2892 | 2891 | | |
2893 | 2892 | | |
2894 | 2893 | | |
| |||
2977 | 2976 | | |
2978 | 2977 | | |
2979 | 2978 | | |
2980 | | - | |
2981 | 2979 | | |
2982 | 2980 | | |
2983 | | - | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
2984 | 2989 | | |
2985 | 2990 | | |
2986 | 2991 | | |
| |||
3002 | 3007 | | |
3003 | 3008 | | |
3004 | 3009 | | |
3005 | | - | |
3006 | | - | |
| 3010 | + | |
| 3011 | + | |
3007 | 3012 | | |
3008 | 3013 | | |
3009 | 3014 | | |
| |||
0 commit comments