[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3fcad89a-77ad-3369-cd8c-88a223758173@kernel.dk>
Date: Tue, 21 Mar 2023 13:32:16 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Howells <dhowells@...hat.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Bharath SM <bharathsm@...rosoft.com>,
Shyam Prasad N <nspmangalore@...il.com>,
Steve French <smfrench@...il.com>,
Robbie Harwood <rharwood@...hat.com>,
Eric Biederman <ebiederm@...ssion.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
keyrings@...r.kernel.org, linux-cifs@...r.kernel.org,
linux-crypto@...r.kernel.org, kexec@...ts.infradead.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] keys: Miscellaneous fixes/changes
On 3/21/23 1:21?PM, Linus Torvalds wrote:
> On Tue, Mar 21, 2023 at 12:16?PM Jens Axboe <axboe@...nel.dk> wrote:
>>
>> I haven't seen the patch yet as it hasn't been pushed,
>
> Well, it went out a couple of minutes before your email, so it's out now.
Yep I see it now, looks as expected.
>> It may make sense to add some debug check for
>> PF_KTHREAD having TIF_NOTIFY_RESUME set, or task_work pending for that
>> matter, as that is generally not workable without doing something to
>> handle it explicitly.
>
> Yeah, I guess we could have some generic check for that. I'm not sure
> where it would be. Scheduler?
Off the top of my head, two options, both in kernel/sched/core.c:
1) Add it to schedule_debug()
2) Add it to sched_submit_work(), adding PF_KTHREAD to the flags checked
for PF_IO_WORKER | PF_WQ_WORKER to avoid adding any extra fast-path
overhead.
Alternatively, I guess it could go in kthread_exit() as well. But for
workloads with a persistent kthread that doesn't really go away, that
won't catch it.
--
Jens Axboe
Powered by blists - more mailing lists