Re: [PATCH V1] fuse: give wakeup hints to the scheduler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 07, 2021 at 03:03:01PM +0100, Miklos Szeredi wrote:
> On Tue, 7 Dec 2021 at 14:51, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > On Tue, Dec 07, 2021 at 02:45:49PM +0100, Peter Zijlstra wrote:
> >
> > > > 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.
> >
> > That said, look at
> > kernel/locking/percpu-rwsem.c:percpu_rwsem_wake_function() for how to do
> > really terrible things with waitqueues, possibly including what you
> > suggest.
> 
> Okay, so it looks doable, but rather more involved than just sticking
> that _sync onto the wake helper.
> 
> FIFO is used so that we always wake the most recently used thread, right?
> 
> That makes sense if it doesn't involve migration, but if the hot
> thread is going to be moved to another CPU then we'd lost most of the
> advantages.  Am I missing something?

FIFO means the thread used longest ago gets to go first. If your threads
are an idempotent workers, FIFO might not be the best option. But I'm
not much familiar with the FUSE code or it's design.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux