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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 22E77C433ED for ; Thu, 20 May 2021 04:34:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F000611BD for ; Thu, 20 May 2021 04:34:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F000611BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EFE7F6B006C; Thu, 20 May 2021 00:34:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EACDB6B006E; Thu, 20 May 2021 00:34:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D261F6B0070; Thu, 20 May 2021 00:34:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 9D83C6B006C for ; Thu, 20 May 2021 00:34:57 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2ED3EAF95 for ; Thu, 20 May 2021 04:34:57 +0000 (UTC) X-FDA: 78160344234.25.B846D96 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP id BD6AE8019105 for ; Thu, 20 May 2021 04:34:55 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9702D610CC; Thu, 20 May 2021 04:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1621485295; bh=KJiuXtdPBYbs0Q3wvWX1J2cBytAzfonsO3RA/+c2RmQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aUXuC9rcdS09mfXi702zd909LrcM2sJxlqhkh62LPWAFl3GBtcQiu7pp6BRxPfaMb 0J5HoY6x6ZvxtTJ2KuWphAoO8ALGwPZhF3dLbSmaSWj9HUSYQ6mO/kwP0mseN9lKkF lrIpd4quwLYV9EI6XXVhMtJ9Xa1NtHPBjaC9M52U= Date: Wed, 19 May 2021 21:34:55 -0700 From: Andrew Morton To: Aaron Tomlin Cc: linux-mm@kvack.org, vbabka@suse.cz, mhocko@suse.com, willy@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt Message-Id: <20210519213455.97ff95f0124b4120787f8314@linux-foundation.org> In-Reply-To: <20210519201743.3260890-1-atomlin@redhat.com> References: <20210519201743.3260890-1-atomlin@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BD6AE8019105 Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=aUXuC9rc; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: 8s5853dtkw155b3d58iq7sqe93fcmdyi X-HE-Tag: 1621485295-283213 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, 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. > 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?