All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org,
	peterz@infradead.org, tglx@linutronix.de
Subject: Re: [PATCH 3/5] kernel: add support for TIF_NOTIFY_SIGNAL
Date: Thu, 15 Oct 2020 08:43:20 -0600	[thread overview]
Message-ID: <788b31b7-6acc-cc85-5e91-d0c2538341b7@kernel.dk> (raw)
In-Reply-To: <20201015143728.GE24156@redhat.com>

On 10/15/20 8:37 AM, Oleg Nesterov wrote:
> On 10/15, Jens Axboe wrote:
>>
>> On 10/15/20 8:31 AM, Oleg Nesterov wrote:
>>> On 10/15, Jens Axboe wrote:
>>>>
>>>>  static inline int signal_pending(struct task_struct *p)
>>>>  {
>>>> +#if defined(CONFIG_GENERIC_ENTRY) && defined(TIF_NOTIFY_SIGNAL)
>>>> +	/*
>>>> +	 * TIF_NOTIFY_SIGNAL isn't really a signal, but it requires the same
>>>> +	 * behavior in terms of ensuring that we break out of wait loops
>>>> +	 * so that notify signal callbacks can be processed.
>>>> +	 */
>>>> +	if (unlikely(test_tsk_thread_flag(p, TIF_NOTIFY_SIGNAL)))
>>>> +		return 1;
>>>> +#endif
>>>>  	return task_sigpending(p);
>>>>  }
>>>
>>> I don't understand why does this version requires CONFIG_GENERIC_ENTRY.
>>>
>>> Afaics, it is very easy to change all the non-x86 arches to support
>>> TIF_NOTIFY_SIGNAL, but it is not trivial to change them all to use
>>> kernel/entry/common.c ?
>>
>> I think that Thomas wants to gate TIF_NOTIFY_SIGNAL on conversion to
>> the generic entry code?
> 
> Then I think TIF_NOTIFY_SIGNAL will be never fully supported ;)

That is indeed a worry. From a functionality point of view, with the
major archs supporting it, I'm not too worried about that side. But it
does mean that we'll be stuck with the ifdeffery forever, which isn't
great.

Thomas, are you fine with decoupling this from CONFIG_GENERIC_ENTRY,
based on the above concerns?

-- 
Jens Axboe


  reply	other threads:[~2020-10-15 14:43 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 [this message]
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
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 \
    --in-reply-to=788b31b7-6acc-cc85-5e91-d0c2538341b7@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.