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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 CD0BAC433C1 for ; Fri, 19 Mar 2021 17:29:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4BB636191C for ; Fri, 19 Mar 2021 17:29:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BB636191C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 868056B006E; Fri, 19 Mar 2021 13:29:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 817666B0070; Fri, 19 Mar 2021 13:29:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E0316B0073; Fri, 19 Mar 2021 13:29:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 526BE6B006E for ; Fri, 19 Mar 2021 13:29:21 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 10986180AE800 for ; Fri, 19 Mar 2021 17:29:21 +0000 (UTC) X-FDA: 77937310080.19.8250441 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf02.hostedemail.com (Postfix) with ESMTP id E1E6B40002C7 for ; Fri, 19 Mar 2021 17:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616174946; h=from:from:reply-to:subject:subject: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=LomUmpcQaVh6N02UFTSsiZ9QqjpSd6FGeimkZw0uTk8=; b=cZbpI7yspIHvbMuZ4SGb28JmRk0dcXHHmxZAxeU7kRMDWk3+JmmJLZUIfRUJOMTVWKXe5/ yH7GVtNhdqfBIFlEH6rx9P5V0SbuEgjfECdFc/n4IbgTowLjN9K8L5ZjJvvEOyxEbStciF vdQrHmuVrmiNXwGyfxBZH30ZdBWyNWI= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-xlmBtxKMPaiZOGvzjwyc0w-1; Fri, 19 Mar 2021 13:29:04 -0400 X-MC-Unique: xlmBtxKMPaiZOGvzjwyc0w-1 Received: by mail-ej1-f72.google.com with SMTP id k16so18528914ejg.9 for ; Fri, 19 Mar 2021 10:29:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LomUmpcQaVh6N02UFTSsiZ9QqjpSd6FGeimkZw0uTk8=; b=UFRNjL6/JCWEZfn3CW6fGuPNErpGhoh72ankhpWgAOWMjOo6I+mBAOMqswRWyNQOtq xIb2WH3v3aQgujV06ffjIUOLoJ2Bk10bL4iK/Nl6771826UAVaoIoM4ztmAyhThyEHeU Fxa5cKZh1cRwV35ozSlzUpbNPbvznxiyz2hRM9sCmgTF5QK65/9wFugOkR6+UyKLDPhv l7TylYE9WppevCJXdxkOLmnUbXe/jBdDOLjP+cUqvxKGzSni9bHYpWxW6ihLBk0cGvuO PyhUUT9hmnLvKEZ6NlFXLSFMKoYKU5/6e0ep2cHoJOs1V8n9r/Mjx7DJrVil3leLoE5D iAlA== X-Gm-Message-State: AOAM532dD1kxEn/4gBXFo/d4nW84BgeSECzWFfEzEhP7in5RJd+d0feG M3M66klNTZ7UV77yuBHl5xrcznkUqkxTyEqlSoDO/xyTL12WunbBiLttY1l3VTskwT+QeTsxBF8 pSpSNTRfceQ== X-Received: by 2002:a17:906:4705:: with SMTP id y5mr5719792ejq.119.1616174943004; Fri, 19 Mar 2021 10:29:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn1utTL8I0+LkwA8AB1Fh4ktosHgIyrKuoo8t4HMBAku6kx8VKgoV/75izwollowIKwHDMBg== X-Received: by 2002:a17:906:4705:: with SMTP id y5mr5719783ejq.119.1616174942889; Fri, 19 Mar 2021 10:29:02 -0700 (PDT) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id sb4sm4056118ejb.71.2021.03.19.10.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 10:29:02 -0700 (PDT) Date: Fri, 19 Mar 2021 17:29:01 +0000 From: Aaron Tomlin To: Michal Hocko Cc: linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress Message-ID: <20210319172901.cror2u53b7caws3a@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20210315165837.789593-1-atomlin@redhat.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=atomlin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Stat-Signature: f7hb64rhxcqm8ye37r3hfoqfcxodsmhn X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E1E6B40002C7 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616174951-785277 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: Hi Michal, On Thu 2021-03-18 17:16 +0100, Michal Hocko wrote: > On Mon 15-03-21 16:58:37, Aaron Tomlin wrote: > > In the situation where direct reclaim is required to make progress for > > compaction but no_progress_loops is already over the limit of > > MAX_RECLAIM_RETRIES consider invoking the oom killer. Firstly, thank you for your response. > What is the problem you are trying to fix? If I understand correctly, in the case of a "costly" order allocation request that is permitted to repeatedly retry, it is possible to exceed the maximum reclaim retry threshold as long as "some" progress is being made even at the highest compaction priority. Furthermore, if the allocator has a fatal signal pending, this is not considered. In my opinion, it might be better to just give up straight away or try and use the OOM killer only in the non-costly order allocation scenario to assit reclaim. Looking at __alloc_pages_may_oom() the current logic is to entirely skip the OOM killer for a costly order request, which makes sense. Regards, -- Aaron Tomlin