Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1585794lkv; Wed, 19 May 2021 13:24:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxt0Dup2wSYnF9QL5wPDZMmc2k4/Iue2gfAypYMrEIdc7EZdOHF91Nz5q0OW8Q5NnIw8Ga X-Received: by 2002:a17:906:5049:: with SMTP id e9mr977784ejk.30.1621455885980; Wed, 19 May 2021 13:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455885; cv=none; d=google.com; s=arc-20160816; b=EBLB2+OpoKcaKTnuUjDPCBOhiq2oHlhZsCKd3O3DfWCJsmeVM35W6ShdHwwz8hnzPO txVWUXZpTxhDAn6k41t80hukzmKroprh49rqoRAmrSS84RNbznOejVQQGzproZqnzPCZ 8UD5MiKe6InPyLaosSb3tqTtfEK9IARZCXTXa2hpZ1hzvupnO1kaqSdrILQlRjdMrdz+ DOjF0J7uI7CUhmo9CG+6VlQdz2EuvGYitkpCXB0y0+SsKQmxgaucfNCsfUQCFt4OeUyv Y0yIqY17ZQ6y5LmIZ3t83vlm/RwRE8kId2DqtADF2msSZvVUl0j6wqBBx7lTL5Skj3UF 3Umw== 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=wr3Ku9b6p1OcKYD36FL40EcvE+r2U3PE5PB9FmNodEs=; b=FfovzjHlz4CqFn0eBz/9V9cBWeT1MgrO0kcRKy5XQ6so9WNWzJ9oyeTGYoYa2JjSow b/lDiAJlS5WS6uj0djWYpNO5ZdrERDw/PpB9Gg3hfCp24bgd3m+21/UZ5KJFtkGXjn5c si+b91wdbKGDNIYVx5+j0p9xvuxTAh7Du8UiT7T08wd0uKNuzEcx14lZPJCwno9E0oeN G1gy7Jf7ZYMdo+Exu2nAiM4y/oxpxYmXS8ZAYnu+xnN5CR7ZjgRAXP7HVEtvf5s4e6b3 5u/xNsplGqGAsdum8LOx91D3rQSHwB8UdiGlFe4FdvuM58E+nSJ7ouIjWqE1Kk38UIXs SxLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mPPtsrhs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si668337ejc.549.2021.05.19.13.24.22; Wed, 19 May 2021 13:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=mPPtsrhs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232119AbhESTfr (ORCPT + 99 others); Wed, 19 May 2021 15:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232089AbhESTfq (ORCPT ); Wed, 19 May 2021 15:35:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C015FC06175F for ; Wed, 19 May 2021 12:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wr3Ku9b6p1OcKYD36FL40EcvE+r2U3PE5PB9FmNodEs=; b=mPPtsrhsbyPiTB6GtS0B5RkZh6 zT101ItlUS3Q3Eh8iqbahWXPa6CgN7YPLjar/KSdVp3ruNo1QXj8C4mugiTz6DhJQHL6MDtkNeMJp QUJaeZxa/pYXMXQ6ALaFbrBJYBGI1wLWEFRLPHrSk8DkdveV3Hl7ps/Ioz2eVF8xtq/An6CZn9zSV tMSw4QxJJp+I2/ll220djhSGcjOjBZwcJANSwqV7iyugpcKbna7VPFp8fuNcISO6VFN0ZtkA+QeO3 gD6gI6TDwEuAtOa8EV03B4Y8Gky6P9nRuS8rsoEsc0FQhqUFL6QmGlVAMMRhNAXuopOK2Pn5/RSa9 WvFWA4zA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1ljRwB-00FFDH-TK; Wed, 19 May 2021 19:33:13 +0000 Date: Wed, 19 May 2021 20:32:59 +0100 From: Matthew Wilcox To: Aaron Tomlin Cc: linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt Message-ID: References: <20210519192321.3247175-1-atomlin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210519192321.3247175-1-atomlin@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 08:23:21PM +0100, Aaron Tomlin wrote: > +++ b/mm/page_alloc.c > @@ -4252,6 +4252,9 @@ should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, > if (!order) > return false; > > + if (fatal_signal_pending(current)) > + goto out; I think 'goto out' will be confusing. It'll output a tracepoint, which isn't going to record that a fatal signal is pending, so it'll cause some head scratching for someone looking through the traces. I think we should just return false here and skip the tracepoint. But I'd defer to someone like Vlastimil or Michal who know this code far better than I do.