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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24981C433B4 for ; Wed, 19 May 2021 19:33:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DD92F61184 for ; Wed, 19 May 2021 19:33:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD92F61184 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6790A6B0036; Wed, 19 May 2021 15:33:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EEE36B006E; Wed, 19 May 2021 15:33:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 468836B0070; Wed, 19 May 2021 15:33:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 10A236B0036 for ; Wed, 19 May 2021 15:33:55 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A48CE181AEF3F for ; Wed, 19 May 2021 19:33:54 +0000 (UTC) X-FDA: 78158980788.07.E6B781F Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id AC4AD41C for ; Wed, 19 May 2021 19:33:52 +0000 (UTC) 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> Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=mPPtsrhs; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AC4AD41C X-Stat-Signature: yptoo9ocdg3nrddzrxuwczpx99fit5iz X-HE-Tag: 1621452832-756943 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.