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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 354EDC433B4 for ; Thu, 20 May 2021 10:20:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 638C26101D for ; Thu, 20 May 2021 10:20:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 638C26101D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D77C18E0001; Thu, 20 May 2021 06:20:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D006F6B00AF; Thu, 20 May 2021 06:20:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA0FE8E0001; Thu, 20 May 2021 06:20:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 824076B00AE for ; Thu, 20 May 2021 06:20:32 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 22AB75DFC for ; Thu, 20 May 2021 10:20:32 +0000 (UTC) X-FDA: 78161215104.28.BE91A71 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf01.hostedemail.com (Postfix) with ESMTP id EA5AF500164F for ; Thu, 20 May 2021 10:20:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 63FD5AC5B; Thu, 20 May 2021 10:20:30 +0000 (UTC) Subject: Re: [PATCH v3] mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt To: Andrew Morton , Aaron Tomlin Cc: linux-mm@kvack.org, mhocko@suse.com, willy@infradead.org, linux-kernel@vger.kernel.org References: <20210519201743.3260890-1-atomlin@redhat.com> <20210519213455.97ff95f0124b4120787f8314@linux-foundation.org> From: Vlastimil Babka Message-ID: <9b11dcd8-bc3b-aae9-feb1-43543bf9e22f@suse.cz> Date: Thu, 20 May 2021 12:20:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210519213455.97ff95f0124b4120787f8314@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf01.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: nch8fx8ak4z3pt75ihoiefxyueqcnhq4 X-Rspamd-Queue-Id: EA5AF500164F X-Rspamd-Server: rspam02 X-HE-Tag: 1621506029-65192 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 5/20/21 6:34 AM, Andrew Morton wrote: > On Wed, 19 May 2021 21:17:43 +0100 Aaron Tomlin wrote: > >> It does not make sense to retry compaction when a fatal signal is >> pending. > > Well, it might make sense. Presumably it is beneficial to other tasks. Yeah but the compaction won't happen. compact_zone() will immediately detect it via __compact_finished() and bail out. So in that sense it does not make sense to retry :) >> In the context of try_to_compact_pages(), indeed COMPACT_SKIPPED can be >> returned; albeit, not every zone, on the zone list, would be considered >> in the case a fatal signal is found to be pending. >> Yet, in should_compact_retry(), given the last known compaction result, >> each zone, on the zone list, can be considered/or checked >> (see compaction_zonelist_suitable()). For example, if a zone was found >> to succeed, then reclaim/compaction would be tried again >> (notwithstanding the above). >> >> This patch ensures that compaction is not needlessly retried >> irrespective of the last known compaction result e.g. if it was skipped, >> in the unlikely case a fatal signal is found pending. >> So, OOM is at least attempted. > > What observed problems motivated this change? > > What were the observed runtime effects of this change? Yep those details from the previous thread should be included here.