public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Thomas Gleixner <[email protected]>, Oleg Nesterov <[email protected]>
Cc: [email protected], [email protected],
	[email protected], Roman Gershman <[email protected]>
Subject: Re: [PATCH 5/5] task_work: use TIF_NOTIFY_SIGNAL if available
Date: Fri, 16 Oct 2020 07:33:17 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 10/16/20 3:00 AM, Thomas Gleixner wrote:
> On Thu, Oct 15 2020 at 12:39, Jens Axboe wrote:
>> On 10/15/20 9:49 AM, Oleg Nesterov wrote:
>>> You can simply nack the patch which adds TIF_NOTIFY_SIGNAL to
>>> arch/xxx/include/asm/thread_info.h.
> 
> As if that is going to change anything...
> 
>> This seems to be the biggest area of contention right now. Just to
>> summarize, we have two options:
>>
>> 1) We leave the CONFIG_GENERIC_ENTRY requirement, which means that the
>>    rest of the cleanups otherwise enabled by this series will not be
>>    able to move forward until the very last arch is converted to the
>>    generic entry code.
>>
>> 2) We go back to NOT having the CONFIG_GENERIC_ENTRY requirement, and
>>    archs can easily opt-in to TIF_NOTIFY_SIGNAL independently of
>>    switching to the generic entry code.
>>
>> I understand Thomas's reasoning in wanting to push archs towards the
>> generic entry code, and I fully support that. However, it does seem like
>> the road paved by #1 is long and potentially neverending, which would
>> leave us with never being able to kill the various bits of code that we
>> otherwise would be able to.
>>
>> Thomas, I do agree with Oleg on this one, I think we can make quicker
>> progress on cleanups with option #2. This isn't really going to hinder
>> any arch conversion to the generic entry code, as arch patches would be
>> funeled through the arch trees anyway.
> 
> I completely understand the desire to remove the jobctl mess and it
> looks like a valuable cleanup on it's own.
> 
> But I fundamentaly disagree with the wording of #2:
> 
>     'and archs can easily opt-in ....'
> 
> Just doing it on an opt-in base is not any different from making it
> dependent on CONFIG_GENERIC_ENTRY. It's just painted differently and
> makes it easy for you to bring the performance improvement to the less
> than a handful architectures which actually care about io_uring.

It's a lot easier for me to add support for archs for TIF_NOTIFY_SIGNAL,
than it is to convert them to CONFIG_GENERIC ENTRY. And in fact I
already _did_ convert all archs, in a separate series. Is it perfect
yet? No. arm needs a bit of love, powerpc should be cleaned up once the
5.10 merge happens for that arch (dropping a bit), and s390 I need
someone to verify. But apart from that, it is already done.

> So if you change #2 to:
> 
>    Drop the CONFIG_GENERIC_ENTRY dependency, make _all_ architectures
>    use TIF_NOTIFY_SIGNAL and clean up the jobctl and whatever related
>    mess.
> 
> and actually act apon it, then I'm fine with that approach.

Already did that too!

https://git.kernel.dk/cgit/linux-block/log/?h=tif-task_work.arch

It's sitting on top of this series. So the work is already done.

> Anything else is just proliferating the existing mess and yet another
> promise of great improvements which never materialize.
> 
> Just to prove my point:
> 
> e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()")
> 
> added TWA_SIGNAL in June with the following in the changelog:
> 
>     TODO: once this patch is merged we need to change all current users
>     of task_work_add(notify = true) to use TWA_RESUME.

Totally agree the ball was dropped on this one. I did actually write a
patch, just never had time to get it out.
 
> This features first and let others deal with the mess we create mindset
> has to stop. I'm dead tired of it.

I totally agree, and we're on the same page. I think you'll find that in
the past I always carry through, the task_work notification was somewhat
of a rush due to a hang related to it. For this particular case, the
cleanups and arch additions are pretty much ready to go.

-- 
Jens Axboe


  parent reply	other threads:[~2020-10-16 13:33 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 13:16 [PATCHSET v5] Add support for TIF_NOTIFY_SIGNAL Jens Axboe
2020-10-15 13:16 ` [PATCH 1/5] tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume() Jens Axboe
2020-10-15 14:42   ` Oleg Nesterov
2020-10-15 14:43     ` Jens Axboe
2020-10-15 13:16 ` [PATCH 2/5] kernel: add task_sigpending() helper Jens Axboe
2020-10-15 14:42   ` Oleg Nesterov
2020-10-15 13:16 ` [PATCH 3/5] kernel: add support for TIF_NOTIFY_SIGNAL Jens Axboe
2020-10-15 14:31   ` Oleg Nesterov
2020-10-15 14:33     ` Jens Axboe
2020-10-15 14:37       ` Oleg Nesterov
2020-10-15 14:43         ` Jens Axboe
2020-10-15 14:47           ` Oleg Nesterov
2020-10-15 14:53             ` Oleg Nesterov
2020-10-15 14:56               ` Jens Axboe
2020-10-15 15:01         ` Thomas Gleixner
2020-10-15 15:27           ` Oleg Nesterov
2020-10-15 14:44   ` Oleg Nesterov
2020-10-15 13:17 ` [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL Jens Axboe
2020-10-15 14:11   ` Thomas Gleixner
2020-10-15 14:31     ` Jens Axboe
2020-10-15 14:34       ` Thomas Gleixner
2020-10-15 14:35         ` Jens Axboe
2020-10-15 14:36       ` Oleg Nesterov
2020-10-15 14:42         ` Jens Axboe
2020-10-15 14:34     ` Oleg Nesterov
2020-10-15 14:54       ` Thomas Gleixner
2020-10-15 15:17         ` Oleg Nesterov
2020-10-16  9:55       ` Thomas Gleixner
2020-10-16 10:54         ` Oleg Nesterov
2020-10-16 13:07           ` Thomas Gleixner
2020-10-15 14:44   ` Oleg Nesterov
2020-10-20 10:57   ` introduce asm-generic/thread_info.h ? Oleg Nesterov
2020-10-15 13:17 ` [PATCH 5/5] task_work: use TIF_NOTIFY_SIGNAL if available Jens Axboe
2020-10-15 15:49   ` Oleg Nesterov
2020-10-15 18:39     ` Jens Axboe
2020-10-16  9:00       ` Thomas Gleixner
2020-10-16  9:39         ` Thomas Gleixner
2020-10-16 13:35           ` Jens Axboe
2020-10-16 14:17             ` Thomas Gleixner
2020-10-16 14:51               ` Oleg Nesterov
2020-10-16 14:53                 ` Jens Axboe
2020-10-16 18:03                   ` Thomas Gleixner
2020-10-16 18:05                     ` Jens Axboe
2020-10-16 13:33         ` Jens Axboe [this message]
2020-10-16 14:11           ` Thomas Gleixner
2020-10-16 14:22             ` Jens Axboe

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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