Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2527427pxj; Mon, 31 May 2021 04:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoEQFGixUTvIXSZIC4gKGqJnYB1l7euO7KD4Zgu8i5RySjJKBEzqN8NyPjNP8NQYJfJfEU X-Received: by 2002:a17:906:dc4c:: with SMTP id yz12mr21983361ejb.364.1622461075998; Mon, 31 May 2021 04:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622461075; cv=none; d=google.com; s=arc-20160816; b=04eyS5NU9MAUOc6skYHnSuk4Dn2Ke85iqifXsnLCRpoyeDWBodg01gEBPlY6DZXStZ 4NmrAZQ4wPPxdWIfnWPrgbjSXQw3tmG3uALZllhW/gAmOhi31/rh0wt5C5N0Z2l4rZA6 ZuMcyDwm3IiEeS61pttGQm42lbbjZrbfIj7aO+oWJvO+a3WnUWiyGDyJhZinVl0gOtx+ onisQBOoezMrwEAhem8bj4AVodX8wJ8A7o70bX3wLFDrZZOokd6ARf0YRsUGEaE78uf7 IMDDbZPJySVRE7iAMta9iGSDlxH8c/kECuNTLuEB3oqqvjKt2vAO8YQ/Bkzj7ZCE90B9 IOyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=aCK5TBvDrOKvurXKewrtxpqHEC6/7/2/MtIqXAxSNc8=; b=Y10dSoufX8vbbUbn4y9dJwMsjyxsCK7xdbxh7Eomj5BhJWJ4ODUrJIaS/lmacAs9ZL hN4nU9bDVr9PsSM68lpOKJWsHOF9v6cZC076Xu9wZQb7C9jtmXdzLI0YhLjAhW4TugjM U7IXLXvlP+vnhqEOAKgkeLGuSKupdFwggAt/SeWFCaSDQxFqr4d4bjYumeyzYKIdynnX s9t7n8YZddtL6np4LYYo2TRojWM2Kjumfi7TrXoxFHj9OowdE4npYzIRIloV4mRUru5f Q8gymHjrKuxj7Kp5YjX5y57iPzGecTfA+10rDKP2QmMTnf5a//FTfp61q/4h/KSk5okp r6kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=OhZlFetc; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=neutral (no key) header.i=@suse.cz; 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 v13si12133727edt.90.2021.05.31.04.37.34; Mon, 31 May 2021 04:37:55 -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=@suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=OhZlFetc; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=j3TMgR3N; dkim=neutral (no key) header.i=@suse.cz; 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 S231315AbhEaLhN (ORCPT + 99 others); Mon, 31 May 2021 07:37:13 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:49132 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbhEaLhM (ORCPT ); Mon, 31 May 2021 07:37:12 -0400 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 Authentication-Results: imap.suse.de; none X-Spam-Level: X-Spam-Score: 0.00 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)[] X-Spam-Flag: NO Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?