From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A905C001B0 for ; Thu, 13 Jul 2023 08:13:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbjGMINR (ORCPT ); Thu, 13 Jul 2023 04:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMILe (ORCPT ); Thu, 13 Jul 2023 04:11:34 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29EA71FD2; Thu, 13 Jul 2023 01:09:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D983A1F45E; Thu, 13 Jul 2023 08:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1689235772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a4lzmGg5bFXSh1ovH2sAfn4p+vzl+/Qk0Uk/Y8saxFI=; b=gG9p7HtN5tIubv2mnEEYqiqb65HTBQtoXZCxTlDSol3E4ZTp+eieRVtCBW254urji2Ww4J L8vQW6OqxtdlyA1g3AbUyQlqypsiX72Y07Pc4rNX4wHIpmuUbobzgiMkIR4jAL6MHm4VB5 dRCvu21WltflCHrFtapcdul0Yv0Eu8w= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B6E2C133D6; Thu, 13 Jul 2023 08:09:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id n05QKjyxr2SZJAAAMHmgww (envelope-from ); Thu, 13 Jul 2023 08:09:32 +0000 Date: Thu, 13 Jul 2023 10:09:31 +0200 From: Michal Hocko To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, Oscar Salvador , Jonathan Corbet , Andrew Morton Subject: Re: [PATCH v1] mm/memory_hotplug: document the signal_pending() check in offline_pages() Message-ID: References: <20230711174050.603820-1-david@redhat.com> <7449914a-1ae3-9ea8-b60b-f0314999b790@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7449914a-1ae3-9ea8-b60b-f0314999b790@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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