From: Bernd Schubert <bschubert@ddn.com>
To: K Prateek Nayak <kprateek.nayak@amd.com>,
Hillf Danton <hdanton@sina.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Amir Goldstein <amir73il@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrei Vagin <avagin@google.com>
Subject: Re: fuse uring / wake_up on the same core
Date: Mon, 27 Mar 2023 14:35:28 +0000 [thread overview]
Message-ID: <1b3ca0e3-cabf-a783-7bde-5bc6d51890fc@ddn.com> (raw)
In-Reply-To: <d9151806-c63a-c1da-12ad-c9c1c7039785@amd.com>
On 3/25/23 08:08, K Prateek Nayak wrote:
> [You don't often get email from kprateek.nayak@amd.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hello Hillf,
>
> On 3/25/2023 5:58 AM, Hillf Danton wrote:
>> On 24 Mar 2023 22:44:16 +0000 Bernd Schubert <bschubert@ddn.com>
>>> How much of hack is this patch?
>>
>> It adds a churn to my mind then another RFC [1] rises.
>>
>> Feel free to make it work for you and resend it.
>>
>> [1] Subject: [RFC PATCH 0/5] sched: Userspace Hinting for Task Placement
>> https://lore.kernel.org/lkml/20220910105326.1797-1-kprateek.nayak@amd.com/
>
> Thank you for pointing to my series.
>
> Another possible way to tackle this is with a strategy Andrei is using in
> his "seccomp: add the synchronous mode for seccomp_unotify" series
> (https://lore.kernel.org/lkml/20230308073201.3102738-1-avagin@google.com/)
>
> In patch 2, Andrei adds a WF_CURRENT_CPU that allows the task to always
> wake on the CPU where the waker is running.
> (https://lore.kernel.org/lkml/20230308073201.3102738-3-avagin@google.com/)
>
> I believe Bernd's requirement calls for a a WF_PREV_CPU which always
> wakes up the task on the CPU where it previously ran. I believe you can
> modify fuse_request_end() (in fs/fuse/dev.c) to use the WF_PREV_CPU flag
> when waking the tasks on req->waitq
>
> (P.S. I'm not familiar with the fuse subsystem but the comment
> "Wake up waiter sleeping in request_wait_answer()" in fuse_request_end()
> seems to suggest that is the right place to add this flag.)
>
> Peter favored wake flag strategy of fixing wakeup target in a reply to an
> earlier version of Andrei's series
> (https://lore.kernel.org/lkml/Y8UgBnsaGDUJKH5A@hirez.programming.kicks-ass.net/)
> but I'll let Peter respond with what he thinks is the right way to tackle
> this.
>
Thanks Hillf, Prateek and Peter! I'm going right now through Andrei's
(will also check Prateek patches later). On the first glance
WF_CURRENT_CPU is exactly what I need. At least for fuse/uring no need
for another 'WF_PREV_CPU' flag - it goes and comes back to/from the ring
on 'current' cpu and only switches on the final completion - staying on
the current cpu is all we need. Will test these patches later today.
Thanks again,
Bernd
next prev parent reply other threads:[~2023-03-27 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 19:50 Bernd Schubert
2023-03-24 22:44 ` Bernd Schubert
[not found] ` <20230325002815.1703-1-hdanton@sina.com>
2023-03-25 7:08 ` K Prateek Nayak
2023-03-27 14:35 ` Bernd Schubert [this message]
2023-03-27 10:28 ` Peter Zijlstra
2023-04-26 22:40 ` Bernd Schubert
[not found] ` <20230427122417.2452-1-hdanton@sina.com>
2023-04-27 13:35 ` Bernd Schubert
[not found] ` <20230428014443.2539-1-hdanton@sina.com>
2023-04-28 21:54 ` Bernd Schubert
2023-05-01 21:44 ` Bernd Schubert
[not found] ` <20230502003335.3253-1-hdanton@sina.com>
2023-05-03 17:04 ` Bernd Schubert
[not found] ` <20230504021656.3823-1-hdanton@sina.com>
2023-05-05 13:10 ` Bernd Schubert
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=1b3ca0e3-cabf-a783-7bde-5bc6d51890fc@ddn.com \
--to=bschubert@ddn.com \
--cc=amir73il@gmail.com \
--cc=avagin@google.com \
--cc=hdanton@sina.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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®