linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Peter Zijlstra <peterz@infradead.org>
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 15:03:01 +0100	[thread overview]
Message-ID: <CAJfpegt2x1ztuzh0niY7fgx1UKxDGsAkJbS0wVPp5awxwyhRpA@mail.gmail.com> (raw)
In-Reply-To: <Ya9m0ME1pom49b+D@hirez.programming.kicks-ass.net>

On Tue, 7 Dec 2021 at 14:51, Peter Zijlstra <peterz@infradead.org> 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?

Thanks,
Miklos

  reply	other threads:[~2021-12-07 14:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  8:46 [PATCH V1] fuse: give wakeup hints to the scheduler 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
2021-12-07 13:51             ` Peter Zijlstra
2021-12-07 14:03               ` Miklos Szeredi [this message]
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=CAJfpegt2x1ztuzh0niY7fgx1UKxDGsAkJbS0wVPp5awxwyhRpA@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).