diff options
| author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2019-10-16 11:54:36 +0200 |
|---|---|---|
| committer | vantoman <mustafa.vantom@gmail.com> | 2021-04-10 13:15:24 +0200 |
| commit | c4b67e558008f7719624b3c82a7dca7c4cbf4358 (patch) | |
| tree | fc55644df6bf4e49a0b9643c5d1eb4147cbc8512 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | f8a536a767c846841f440bb8e5194d8bd99aaa29 (diff) | |
mm/vmalloc: remove preempt_disable/enable when do preloading
Some background. The preemption was disabled before to guarantee
that a preloaded object is available for a CPU, it was stored for.
The aim was to not allocate in atomic context when spinlock
is taken later, for regular vmap allocations. But that approach
conflicts with CONFIG_PREEMPT_RT philosophy. It means that
calling spin_lock() with disabled preemption is forbidden
in the CONFIG_PREEMPT_RT kernel.
Therefore, get rid of preempt_disable() and preempt_enable() when
the preload is done for splitting purpose. As a result we do not
guarantee now that a CPU is preloaded, instead we minimize the
case when it is not, with this change.
For example i run the special test case that follows the preload
pattern and path. 20 "unbind" threads run it and each does
1000000 allocations. Only 3.5 times among 1000000 a CPU was
not preloaded. So it can happen but the number is negligible.
V2 - > V3:
- update the commit message
V1 -> V2:
- move __this_cpu_cmpxchg check when spin_lock is taken,
as proposed by Andrew Morton
- add more explanation in regard of preloading
- adjust and move some comments
Fixes: 82dd23e84be3 ("mm/vmalloc.c: preload a CPU with one object for split purpose")
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
