Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp252198rwp; Wed, 12 Jul 2023 12:43:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOrEv2mU+stABxP+XjLIxh+BCAzlbhTvkO8vMz9ZCi4AdXSz723BZKIXBuxzchXKImNAvT X-Received: by 2002:a17:902:cec3:b0:1b8:971c:b7b7 with SMTP id d3-20020a170902cec300b001b8971cb7b7mr24430314plg.56.1689190990476; Wed, 12 Jul 2023 12:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689190990; cv=none; d=google.com; s=arc-20160816; b=efuSDOhc9FeBqUYr58WDzrHI8/SOZF3oUjLZsE598hifyVEslf5nee+CAQ2dc0jp3b 5KnGlJGNzZS05kC3SasztZJhYvN27j6b/mtV2dyT4rj6T+AxaZQTXg3xO4vut4Gqhv1t CpwhdIsBi3gVmwRh6BM/zBVDftVWlfPVCg5VcnKr2buSUlnp7I7qNC6IRNZrp7+JnBI3 nNIHgz3KR0FR27Wc5EY6MI1RXX7WXukBZ/Pq3eSNwiTYYOgMV3cvmJAbuDFJQEf3ZNB1 uBG9RRqdT5Qhchsl3R2z46+PSyrJpdRlX3e2WT/KSAfDzBiQ8VS5Y0QWFdwB9zlAHR/M UkcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=iVqzN+gEicp3rJj4Bqvo5xYs3/pSCObCBEs+9bPEbpA=; fh=x7tdz5R1uMegN34RYqce9yLujAL4wPrd28MLYj3nUa8=; b=rx3ykhumQKcEvFli0NhrzydLkID23QfhTa118mSWeyHrsIftEu+5RxsJGKdUz/ecml cUL/Tyh/ax5iMDI1JyzMsDthJ0XcOCb8BmAeSJ+A7PxFW1ZVkJ88OL1aTyuc6Sn1jFu8 ft9z/qIOtrYxWuEgDoThiZQzJBzVJrvlYFGrhRIS6B2MtNRXmzlm2ntM8oQ30sQ0kkpm g8w1uXW671BpXiGlkjD5oN6QKTBwSyNoatVx2QlEDfUpuejFFtoGXnXqq0MCBYswH1vl GbTs7QJ/x80A7ra0VSYARN7pNLojT//TXo6j+0NnG2B0+Vyg3xc/Qf76CRLykZ0YS+LM fG8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="PEQ/pCYP"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170902e55000b001b88dbc8b09si3981939plf.454.2023.07.12.12.42.57; Wed, 12 Jul 2023 12:43:10 -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=@redhat.com header.s=mimecast20190719 header.b="PEQ/pCYP"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjGLTKT (ORCPT + 99 others); Wed, 12 Jul 2023 15:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbjGLTKR (ORCPT ); Wed, 12 Jul 2023 15:10:17 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEB71BF8 for ; Wed, 12 Jul 2023 12:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689188969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iVqzN+gEicp3rJj4Bqvo5xYs3/pSCObCBEs+9bPEbpA=; b=PEQ/pCYPQUZ1Wzt8eLRl1f2DjsneFPWUoS00X5lvwCZLo6aDnPyTtJ2W3/K+G7GgquV/Pa /dUYT3ExTwE36D06a3BSw1g8kuTTUFPr1+hAB2KkUvT3Upap5PY/NtR2aI0XGbXLsJR9WR mLofv13gSv2gHvxcvTsYlKqrToSXxOE= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-16-9RsP1BDNNwaYp0z9ewyzKQ-1; Wed, 12 Jul 2023 15:09:27 -0400 X-MC-Unique: 9RsP1BDNNwaYp0z9ewyzKQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-315af0252c2so530866f8f.0 for ; Wed, 12 Jul 2023 12:09:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689188967; x=1691780967; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iVqzN+gEicp3rJj4Bqvo5xYs3/pSCObCBEs+9bPEbpA=; b=gXK+PshmFKaRjQWT0b3Sx+Lkqb8nkc8w/VMIOW+lRvR7RkBTa4EuW1/Qxz32ISy5NO KOquaS7RxhWPYY/STPoUqgOqD6TiNR0GGP+9F120vOwMgknAfMSdBHHmAEgra4oMr6Rt yhUDq96cSyKzdBvAsxFm1TSpHaSZcRQDSL2JeJ29pwAqOguV0Vf9/HufCoDQmSImEDjE oBaHwmB/kCDPcnQXdEYRsHmmtig8NbL7krGUK3tBDb7a1hhn2tcvTBys7Rs2wftf3Tpf JsrOq3A2dcJ+3VfoxDAOh6avaJIcMULczyYGkJSbrpwRAGOHVcwfJUKH2QvxTEc5Yvij 4yMw== X-Gm-Message-State: ABy/qLYyWbMVCLqA6g1MdBmX768JMOjPQb92dcW7FMvyQUqxKMeiMwkW 8pO7deUIDBb0dpXZHUzGektuolOGLg0gRyde0rzg7DryHqR2vvXsvDyhHvyc+VGgpoigReK2hGK /iVy7y5HqZTdxoEo2T5Yramxp X-Received: by 2002:adf:ffca:0:b0:313:f704:5450 with SMTP id x10-20020adfffca000000b00313f7045450mr17948895wrs.38.1689188966791; Wed, 12 Jul 2023 12:09:26 -0700 (PDT) X-Received: by 2002:adf:ffca:0:b0:313:f704:5450 with SMTP id x10-20020adfffca000000b00313f7045450mr17948880wrs.38.1689188966442; Wed, 12 Jul 2023 12:09:26 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:3700:3eea:ace6:5bde:4478? (p200300cbc70737003eeaace65bde4478.dip0.t-ipconnect.de. [2003:cb:c707:3700:3eea:ace6:5bde:4478]) by smtp.gmail.com with ESMTPSA id f6-20020adff586000000b003142eb75724sm5825120wro.24.2023.07.12.12.09.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jul 2023 12:09:25 -0700 (PDT) Message-ID: <7449914a-1ae3-9ea8-b60b-f0314999b790@redhat.com> Date: Wed, 12 Jul 2023 21:09:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1] mm/memory_hotplug: document the signal_pending() check in offline_pages() Content-Language: en-US To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, Oscar Salvador , Jonathan Corbet , Andrew Morton References: <20230711174050.603820-1-david@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,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 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." Thanks! -- Cheers, David / dhildenb