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, 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 9E52EC47097 for ; Mon, 31 May 2021 13:21:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2C2676141A for ; Mon, 31 May 2021 13:21:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C2676141A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 670016B006C; Mon, 31 May 2021 09:21:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 620086B006E; Mon, 31 May 2021 09:21:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E8146B0070; Mon, 31 May 2021 09:21:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 1F2BD6B006C for ; Mon, 31 May 2021 09:21:24 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AF84B824999B for ; Mon, 31 May 2021 13:21:23 +0000 (UTC) X-FDA: 78201587646.18.EB8271A Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP id D377FC00CBF2 for ; Mon, 31 May 2021 13:21:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1622467282; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cn+663xg9Fnis1kPt/caWzCnnri9r67XIbRUjlSvtGg=; b=cORQ88Jay6syGjcqRdfEdiKuMErohocMbegu0uQxg/gOnWoEEFeClHuWZyhAOXqHNYNuMq zkjxd+kSWelM5SgM+QYkH009HIWEyDzEiVknEJpniLx2YmKyfc7pDP2n0hUUzNfvwQMDnx 8E7hhMWNfu9JNJIZQar+kDfdVb0X3Ns= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E200EB4C1; Mon, 31 May 2021 13:21:21 +0000 (UTC) Date: Mon, 31 May 2021 15:21:21 +0200 From: Michal Hocko To: Vlastimil Babka Cc: Aaron Tomlin , linux-mm@kvack.org, akpm@linux-foundation.org, willy@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt Message-ID: References: <20210520142901.3371299-1-atomlin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=cORQ88Ja; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf22.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Stat-Signature: tqyax3g8ukuterefp6jfqso8jmfwa8zn X-Rspamd-Queue-Id: D377FC00CBF2 X-Rspamd-Server: rspam02 X-HE-Tag: 1622467271-362454 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 Mon 31-05-21 13:35:31, Vlastimil Babka wrote: > 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? OK, I was not aware of that and it would be helpful to have that mentioned in the changelog. -- Michal Hocko SUSE Labs