Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2108374lkv; Thu, 20 May 2021 03:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqOmFENZ4yuYGBNJ2MUYs/bJLaT86gH4oelq8n5Qxvn0i5rALgofucFq5wQtnXMrT+xrb4 X-Received: by 2002:a05:6e02:13d4:: with SMTP id v20mr4349203ilj.111.1621506987889; Thu, 20 May 2021 03:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621506987; cv=none; d=google.com; s=arc-20160816; b=P0uM0lznwJVLCkDQwpwt2tgl4kZc2KqnPL0fx/PpyV0m2BXhYi8vKRMJCLQUtpxrCB 9qJkClBsmUT1Pntfj/ouZT4G2b3LP36XDiO11E0u2urJrTZROiLgQ4dJCdCV3kKssurS l0X3KSl0TgBZE1rM0cnArYIDbXr1F1yJPz3x/YWkC/AUO5D4Gx/6waM9dLExpOWOYIEM KDDUrF0nC38NjnP4Vk0VktuLJL/5iFOSo8k3gdQ4aOPd4wSKtUpxA4jHVTP6i6TvUDdR pFZF8L5RramKw40FvyPNUBPYBAWnwPIE83y8l+u0uxYgxranFGD8iKNPiKGm2u2WW0g5 W31w== 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; bh=BWWSgWUB8ZNwvJLPS2QA45CtM0EaggXqm1EoqYfTiJI=; b=I372x8+6sKxSaxVWlCYeXz8hUiXe7Fyxo9n2WNpszmXY/Dy8G0DNOL8awjWefJ1Iku wKPRCe+ZHAipHwekDAG1EUyynpBDh1B9fbcImeUe8+nuQHiPSZeAYtom2GhHtlpbEkKm ZmGgVQ4aFsT9pMH5O9UQC4q6/fpBwHDvmHeMfkJkSP42FJn9DRSuyWKFLyqLeF2Xx5WU lItBGWTotn41b3+csfQt8G1uyMhgkCWbcu0wZUZQ/D9uWjBPmqj0E3wNaYpsEZy97C9T hHClu47mRKbX+RXpAK9gTf3iWKfi/rSX0h8MSazZmXW8fCoxAIGc2FJDyZRHtYlGDlOJ xY2g== ARC-Authentication-Results: i=1; mx.google.com; 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 g6si2134746ila.98.2021.05.20.03.35.45; Thu, 20 May 2021 03:36:27 -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; 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 S237727AbhETKfY (ORCPT + 99 others); Thu, 20 May 2021 06:35:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:41856 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236066AbhETKVw (ORCPT ); Thu, 20 May 2021 06:21:52 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.