From: Michal Hocko <mhocko@suse.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-doc@vger.kernel.org, Oscar Salvador <osalvador@suse.de>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v1] mm/memory_hotplug: document the signal_pending() check in offline_pages()
Date: Thu, 13 Jul 2023 10:09:31 +0200 [thread overview]
Message-ID: <ZK+xOxQSevxpWoCr@dhcp22.suse.cz> (raw)
In-Reply-To: <7449914a-1ae3-9ea8-b60b-f0314999b790@redhat.com>
On Wed 12-07-23 21:09:25, David Hildenbrand wrote:
> On 11.07.23 22:47, Michal Hocko wrote:
> > On Tue 11-07-23 19:40:50, David Hildenbrand wrote:
> > > Let's update the documentation that any signal is sufficient, and
> > > add a comment that not only checking for fatal signals is historical
> > > baggage: changing it now could break existing user space. although
> > > unlikely.
> > >
> > > For example, when an app provides a custom SIGALRM handler and triggers
> > > memory offlining, the timeout cmd would no longer stop memory offlining,
> > > because SIGALRM would no longer be considered a fatal signal.
> >
> > Yes, and it is likely goot to mention here that this is an antipattern
> > for many other kernel operations like IO (e.g. write) but it is a long
> > term behavior that somebody might depend on and it is safer to reflect
> > the documentation to the realitity rather than other way around (which
> > would be imho better).
> >
>
> You mean adding something like
>
> "Note that using signal_pending() instead of fatal_signal_pending() is an
> anti-pattern, but slowly deprecating that behavior to eventually change it
> in the far future is probably not worth the effort. If this ever becomes
> relevant for user-space, we might want to rethink."
Yes, something like that. Thanks!
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2023-07-13 8:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 17:40 David Hildenbrand
2023-07-11 20:47 ` Michal Hocko
2023-07-12 19:09 ` David Hildenbrand
2023-07-13 8:09 ` Michal Hocko [this message]
2023-07-12 6:47 ` Anshuman Khandual
2023-07-12 19:10 ` David Hildenbrand
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=ZK+xOxQSevxpWoCr@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox