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=-7.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,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 D2358C47082 for ; Mon, 31 May 2021 11:35:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 592AF6128A for ; Mon, 31 May 2021 11:35:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 592AF6128A 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 B2D008D0001; Mon, 31 May 2021 07:35:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADD656B0071; Mon, 31 May 2021 07:35:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92F968D0001; Mon, 31 May 2021 07:35:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id 5FC696B0070 for ; Mon, 31 May 2021 07:35:34 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 00A8212D9 for ; Mon, 31 May 2021 11:35:34 +0000 (UTC) X-FDA: 78201320988.22.A87058D Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf08.hostedemail.com (Postfix) with ESMTP id 560368019352 for ; Mon, 31 May 2021 11:35:22 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 33A581FD30; Mon, 31 May 2021 11:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622460932; h=from:from:reply-to: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=aCK5TBvDrOKvurXKewrtxpqHEC6/7/2/MtIqXAxSNc8=; b=j3TMgR3NgsY2uyih+YB62sjtD+0+UA7N6wJLEskaPgh2O/HDRbSx/3W39PHW7a4KL/xTi/ dJaKfpS7TY9GBIMHlXtq6E6iTqu9XrxACw44aPUBnYC758M1oubiPfxH3IwkeTXfO9UlEu QO4EzYkRJpbv+VEpXFbBLpoX5G3YwIE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622460932; h=from:from:reply-to: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=aCK5TBvDrOKvurXKewrtxpqHEC6/7/2/MtIqXAxSNc8=; b=OhZlFetc7flQeS6UI/AgyyAxPuY9VKDEXYwKnQ2EV7Qn/yXikNPLkHQhJCCZpwW1D7rIqD kAuBWvm/PzIF5JCg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 99F67118DD; Mon, 31 May 2021 11:35:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622460932; h=from:from:reply-to: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=aCK5TBvDrOKvurXKewrtxpqHEC6/7/2/MtIqXAxSNc8=; b=j3TMgR3NgsY2uyih+YB62sjtD+0+UA7N6wJLEskaPgh2O/HDRbSx/3W39PHW7a4KL/xTi/ dJaKfpS7TY9GBIMHlXtq6E6iTqu9XrxACw44aPUBnYC758M1oubiPfxH3IwkeTXfO9UlEu QO4EzYkRJpbv+VEpXFbBLpoX5G3YwIE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622460932; h=from:from:reply-to: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=aCK5TBvDrOKvurXKewrtxpqHEC6/7/2/MtIqXAxSNc8=; b=OhZlFetc7flQeS6UI/AgyyAxPuY9VKDEXYwKnQ2EV7Qn/yXikNPLkHQhJCCZpwW1D7rIqD kAuBWvm/PzIF5JCg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 1qITJf3JtGAvIQAALh3uQQ (envelope-from ); Mon, 31 May 2021 11:35:25 +0000 Subject: Re: [PATCH v4] mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt To: Michal Hocko , Aaron Tomlin Cc: linux-mm@kvack.org, akpm@linux-foundation.org, willy@infradead.org, linux-kernel@vger.kernel.org References: <20210520142901.3371299-1-atomlin@redhat.com> From: Vlastimil Babka Message-ID: Date: Mon, 31 May 2021 13:35:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [0.00 / 100.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[6]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=OhZlFetc; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=OhZlFetc; spf=pass (imf08.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 560368019352 X-Stat-Signature: odjsoftmgi5axp3tukxadfkwiocetpkr X-HE-Tag: 1622460922-171850 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/31/21 1:33 PM, Michal Hocko wrote: > On Thu 20-05-21 15:29:01, Aaron Tomlin wrote: >> A customer experienced a low-memory situation and decided to issue a >> SIGKILL (i.e. a fatal signal). Instead of promptly terminating as one >> would expect, the aforementioned task remained unresponsive. >> >> Further investigation indicated that the task was "stuck" in the >> reclaim/compaction retry loop. Now, it does not make sense to retry >> compaction when a fatal signal is pending. > > Is this really true in general? The memory reclaim is retried even when > fatal signals are pending. Why should be compaction different? I do > agree that retrying way too much is bad but is there any reason why this > special case doesn't follow the max retry logic? Compaction doesn't do anything if fatal signal is pending, it bails out immediately and the checks are rather frequent. So why retry?