diff options
| author | Sebastian Andrzej Siewior <[email protected]> | 2022-04-01 18:28:33 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-04-01 18:46:09 +0000 |
| commit | adb11e78c5dc5e26774acb05f983da36447f7911 (patch) | |
| tree | bacf697b157f86712edffebbfd7c08aa7d83e966 /lib/xarray.c | |
| parent | mm/munlock: update Documentation/vm/unevictable-lru.rst (diff) | |
| download | kernel-adb11e78c5dc5e26774acb05f983da36447f7911.tar.gz kernel-adb11e78c5dc5e26774acb05f983da36447f7911.zip | |
mm/munlock: protect the per-CPU pagevec by a local_lock_t
The access to mlock_pvec is protected by disabling preemption via
get_cpu_var() or implicit by having preemption disabled by the caller
(in mlock_page_drain() case). This breaks on PREEMPT_RT since
folio_lruvec_lock_irq() acquires a sleeping lock in this section.
Create struct mlock_pvec which consits of the local_lock_t and the
pagevec. Acquire the local_lock() before accessing the per-CPU pagevec.
Replace mlock_page_drain() with a _local() version which is invoked on
the local CPU and acquires the local_lock_t and a _remote() version
which uses the pagevec from a remote CPU which offline.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions
