[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya9ljdrOkhBhhnJX@hirez.programming.kicks-ass.net>
Date: Tue, 7 Dec 2021 14:45:49 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: Ingo Molnar <mingo@...hat.com>, quic_stummala@...cinc.com,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
quic_pkondeti@...cinc.com, quic_sayalil@...cinc.com,
quic_aiquny@...cinc.com, quic_zljing@...cinc.com,
quic_blong@...cinc.com, quic_richardp@...cinc.com,
quic_cdevired@...cinc.com,
Pradeep P V K <quic_pragalla@...cinc.com>
Subject: Re: [PATCH V1] fuse: give wakeup hints to the scheduler
On Tue, Dec 07, 2021 at 01:44:49PM +0100, Miklos Szeredi wrote:
> On Tue, 7 Dec 2021 at 11:42, Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > On Tue, Dec 07, 2021 at 11:20:59AM +0100, Miklos Szeredi wrote:
>
> > > That may be good for fuse as the data is indeed shared. It would be
> > > even better if the woken task had already a known affinity to this
> > > CPU, since that would mean thread local data wouldn't have to be
> > > migrated each time... So I'm not sure sync wakeup alone is worth it,
> > > needs real life benchmarking.
> >
> > Hard affinities have other down-sides.. occasional migrations shouldn't
> > be a problem, constant migrations are bad.
>
> Currently fuse readers are sleeping in
> wait_event_interruptible_exclusive(). wake_up_interruptible_sync()
> will pick the first thread in the queue and wake that up. That will
> likely result in migration, right?
Per the _sync it will try harder to place the thread on the waking CPU.
Which is what you want right? For the worker to do the work on the CPU
that wakes it, since that CPU has the data cache-hot etc..
> What would be much nicer, is to look at all the threads on the waitq
> and pick one that previously ran on the current CPU if there's one.
> Could this be implemented?
It would violate the FIFO semantics of _exclusive.
Powered by blists - more mailing lists