Re: [PATCH 0/6 v3] sched/mm: LRU drain flush on nohz_full
From: Frederic Weisbecker
Date: Tue Jul 01 2025 - 08:37:38 EST
Le Sat, Apr 12, 2025 at 10:58:22AM +0800, Hillf Danton a écrit :
> On Thu, 10 Apr 2025 17:23:21 +0200 Frederic Weisbecker wrote
> > Hi,
> >
> > When LRUs are pending, the drain can be triggered remotely, whether the
> > remote CPU is running in userspace in nohz_full mode or not. This kind
> > of noise is expected to be caused by preparatory work before a task
> > runs isolated in userspace. This patchset is a proposal to flush that
> > before the task starts its critical work in userspace.
> >
> Alternatively add a syscall for workloads on isolated CPUs to flush
> this xxx and prepare that yyy before entering the critical work, instead
> of adding random (nice) patches today and next month. Even prctl can
> do lru_add_and_bh_lrus_drain(), and prctl looks more preferable over
> adding a syscall.
In an ideal world, this is indeed what we should do now. And I still wish we
can do this in the future.
The problem is that this has been tried by the past and the work was never
finished because that syscall eventually didn't meet the need for the people
working on it.
I would volunteer to start a simple prctl to do such a flush, something that
can be extended in the future, should the need arise, but such a new ABI must
be thought through along with the CPU isolation community.
Unfortunately there is no such stable CPU isolation community. Many developers
in this area contribute changes and then switch to other things. As for the CPU
isolation users, they are usually very quiet.
I can't assume all the possible usecases myself and therefore I would easily do
it wrong.
In the meantime, the patchset here is a proposal that hopefully should work for
many usecases.
Thanks.
--
Frederic Weisbecker
SUSE Labs