mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Ingo Molnar <mingo@redhat.com>,
	quic_stummala@quicinc.com, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, quic_pkondeti@quicinc.com,
	quic_sayalil@quicinc.com, quic_aiquny@quicinc.com,
	quic_zljing@quicinc.com, quic_blong@quicinc.com,
	quic_richardp@quicinc.com, quic_cdevired@quicinc.com,
	Pradeep P V K <quic_pragalla@quicinc.com>
Subject: Re: [PATCH V1] fuse: give wakeup hints to the scheduler
Date: Tue, 7 Dec 2021 14:45:49 +0100	[thread overview]
Message-ID: <Ya9ljdrOkhBhhnJX@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJfpegumZ1RQLBCtbrOiOAT9ygDtDThpySwb8yCpWGBu1fRQmw@mail.gmail.com>

On Tue, Dec 07, 2021 at 01:44:49PM +0100, Miklos Szeredi wrote:
> On Tue, 7 Dec 2021 at 11:42, Peter Zijlstra <peterz@infradead.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.

  reply	other threads:[~2021-12-07 13:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  8:46 Pradeep P V K
2021-12-07  9:07 ` Miklos Szeredi
2021-12-07 10:07   ` Peter Zijlstra
2021-12-07 10:20     ` Miklos Szeredi
2021-12-07 10:41       ` Peter Zijlstra
2021-12-07 12:44         ` Miklos Szeredi
2021-12-07 13:45           ` Peter Zijlstra [this message]
2021-12-07 13:51             ` Peter Zijlstra
2021-12-07 14:03               ` Miklos Szeredi
2021-12-07 14:25                 ` Peter Zijlstra
2021-12-08 15:46                   ` Miklos Szeredi
2021-12-09 13:23                     ` Shachar Sharon
2022-12-22  9:34 ` qixiaoyu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ya9ljdrOkhBhhnJX@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mingo@redhat.com \
    --cc=quic_aiquny@quicinc.com \
    --cc=quic_blong@quicinc.com \
    --cc=quic_cdevired@quicinc.com \
    --cc=quic_pkondeti@quicinc.com \
    --cc=quic_pragalla@quicinc.com \
    --cc=quic_richardp@quicinc.com \
    --cc=quic_sayalil@quicinc.com \
    --cc=quic_stummala@quicinc.com \
    --cc=quic_zljing@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®