[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZK+xOxQSevxpWoCr@dhcp22.suse.cz>
Date: Thu, 13 Jul 2023 10:09:31 +0200
From: Michal Hocko <mhocko@...e.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-doc@...r.kernel.org, Oscar Salvador <osalvador@...e.de>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v1] mm/memory_hotplug: document the signal_pending()
check in offline_pages()
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
Powered by blists - more mailing lists