Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp852347rwp; Thu, 13 Jul 2023 02:01:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOAdMwOBhEBjXpNhVQGKukdj3D/4zO7wKgJ8HyKxCFUgRoqXvRup6fK1uuPIb2qfvhMXWF X-Received: by 2002:aa7:c391:0:b0:51d:d3d4:d02d with SMTP id k17-20020aa7c391000000b0051dd3d4d02dmr1785291edq.5.1689238873078; Thu, 13 Jul 2023 02:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689238873; cv=none; d=google.com; s=arc-20160816; b=ikRMbiZDkT7ZYM1jD0s+HRyWNaRSQENjUj14wlXWo91W3vXolOYUHki/gnAtTvBFJh xgk08sYpXxo7+J4WFrWXEHmdEMg/Rpa++4APZrocndyqhvfWpEmHdsMXS+w85A5GVDo9 hE0AikOzrVCZy9eqMDX6JYCueaFNCt2SE/DDCYZKohnOtW97LW1bb2HdJ9u8a8CwEdIz JVWbLVTbFJD49gyoHw6/iPcJ7You7W++Gj++oj9pp4HxFYyXOuiDj5S26bXNw8gJyYUW ackWoDSFnL0RRlUa1ab1HS/1jOxF+ZL2YhrZ2eSf5pGjRqitz85/4j3y8dtPeWHr84fU boaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a4lzmGg5bFXSh1ovH2sAfn4p+vzl+/Qk0Uk/Y8saxFI=; fh=XMRMjF4ALvom2cZr0VGttxAexWkF9IzaJbVOgftPtM0=; b=D9ePoqSrn+8DMBrWZ34gv2Kvzoz0mQ/rY/+XQty5WqjGI0NGbh17HflESo19r2dNW/ 9IXsAOqZtQVdcVLtssfYscHk4A+lNbe4x83GXyj9xvOP8FlcZ0Jxpamft+m39I4hBIg6 rK83m6TpUzfFg6PCPIb1VR6PZqpAqTMLD/7oHA63btv4g064ch9D0XdSEVTORbFW+ETF xtfzg2k7CoODh3QfWNPE8i9NbAKxBENGtBD35qvfUCY5Qqrv7qDbFnUSU1IciX8WvyfN Yzc2SDqvhl/JYsUH0VPaqJNUktJmK54uVBQuT2ts6PpTQeWpKoa5E0U0VkLep4pqOHCt ZJ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gG9p7HtN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a50ef04000000b0051dd307727dsi6612645eds.59.2023.07.13.02.00.46; Thu, 13 Jul 2023 02:01:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gG9p7HtN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234135AbjGMINP (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:15 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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