[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f608b4bf-aa36-b0c4-e748-4f39010f3d06@suse.cz>
Date: Tue, 21 Sep 2021 19:59:51 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Nicolas Saenz Julienne <nsaenzju@...hat.com>,
akpm@...ux-foundation.org, frederic@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
tglx@...utronix.de, cl@...ux.com, peterz@...radead.org,
juri.lelli@...hat.com, mingo@...hat.com, mtosatti@...hat.com,
nilal@...hat.com, mgorman@...e.de, ppandit@...hat.com,
williams@...hat.com, bigeasy@...utronix.de,
anna-maria@...utronix.de, linux-rt-users@...r.kernel.org
Subject: Re: [PATCH 0/6] mm: Remote LRU per-cpu pagevec cache/per-cpu page
list drain support
On 9/21/21 6:13 PM, Nicolas Saenz Julienne wrote:
> This series introduces an alternative locking scheme around mm/swap.c's per-cpu
> LRU pagevec caches and mm/page_alloc.c's per-cpu page lists which will allow
> for remote CPUs to drain them. Currently, only a local CPU is permitted to
> change its per-cpu lists, and it's expected to do so, on-demand, whenever a
> process demands it (by means of queueing an drain task on the local CPU). Most
> systems will handle this promptly, but it'll cause problems for NOHZ_FULL CPUs
> that can't take any sort of interruption without breaking their functional
> guarantees (latency, bandwidth, etc...). Having a way for these processes to
> remotely drain the lists themselves will make co-existing with isolated CPUs
> possible, at the cost of more constraining locks.
>
> Fortunately for non-NOHZ_FULL users, the alternative locking scheme and remote
> drain code are conditional to a static key which is disabled by default. This
> guarantees minimal functional or performance regressions. The feature will only
> be enabled if NOHZ_FULL's initialization process was successful.
>
> This work is based on a previous series by Thomas Gleixner, Anna-Maria
> Gleixner, and Sebastian Andrzej Siewior[1].
These days the pcplist protection is done by local_lock, which solved
the RT concerns. Probably a stupid/infeasible idea, but maybe what you
want to achieve could be more generally solved at the local_lock level?
That on NOHZ_FULL CPUs, local_locks could have this mode where they
could synchronize with remote cpus?
> [1] https://patchwork.kernel.org/project/linux-mm/patch/20190424111208.24459-3-bigeasy@linutronix.de/
>
> Nicolas Saenz Julienne (6):
> mm/swap: Introduce lru_cpu_needs_drain()
> mm/swap: Introduce alternative per-cpu LRU cache locking
> mm/swap: Allow remote LRU cache draining
> mm/page_alloc: Introduce alternative per-cpu list locking
> mm/page_alloc: Allow remote per-cpu page list draining
> sched/isolation: Enable 'remote_pcpu_cache_access' on NOHZ_FULL
> systems
>
> kernel/sched/isolation.c | 9 +-
> mm/internal.h | 2 +
> mm/page_alloc.c | 111 ++++++++++++++++-----
> mm/swap.c | 202 ++++++++++++++++++++++++++++++---------
> 4 files changed, 253 insertions(+), 71 deletions(-)
>
Powered by blists - more mailing lists