Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1592799pxf; Fri, 19 Mar 2021 10:32:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLnxiQRFlX/T2WWBrMJ+g3/AbPTgG9I4lBPMd7Z8f9inJMuE5jdKrYP/In9YM5+SVK6g83 X-Received: by 2002:a50:fc94:: with SMTP id f20mr10913774edq.370.1616175172742; Fri, 19 Mar 2021 10:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616175172; cv=none; d=google.com; s=arc-20160816; b=WzFd1rcpqngeU24aQOvwYeGbyE8A1/cILXJRGFCgfR9ERFXvLJhPWT784oAd1dT/er AozEUIpUX63UdJemYQJcjrVdC56nWXljDLyftXlxemPlRgOS/VIJW0fRW9TOVdDZ5BqQ jKVq8PYdYXhdsLG0GB+VYvD9tr9qYBX3DvzbrFSpdhWP/+JBu3Hru15Hjy+yRjDbnFdt PFcCrgQrs2vJR3JbpU0QRhb2fVWNL+qtat1crsA9aFI0eJeYiIvF37RCgUmGOGyQvEkc UPvS3XikqwMXntbC9JpA2lvFiuI2MHALrxYxe5NjJyPVhl/6IIzf42SNx5OhabvlpPRR ZeBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LomUmpcQaVh6N02UFTSsiZ9QqjpSd6FGeimkZw0uTk8=; b=lAljFYPZcHgZbYB50WGaKJiBl6y0K/5pef4rmYSMXHYCl42J4RtWns/kzUV68uStPN DJnQBwwjveaIdsANLCfBNGuQFQv23XZZQCKLz3+LqqBOxMvQl7slzz6T22uuDqqeSTrA YrkTZyRUV8jl7qS6435U7VeMGKjrue7ELe0Xe0vXFK2pruT3NNEivUFjftgod4PIfcrc fvi3BDIPZwoKCIbqOJhYaYDuTs7m6vB0ZpRawcSbOw6XgoIx5pTSTf8uuFdmEn6nrOtZ vlEk0PSNRJTn6RI0O4yJGmNmkaXRdCz8EEQYAOrA3g08j6C2GvlIFwfgD+4NxCyMqdaN HV5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cZbpI7ys; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si4713927edp.392.2021.03.19.10.32.30; Fri, 19 Mar 2021 10:32:52 -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=@redhat.com header.s=mimecast20190719 header.b=cZbpI7ys; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbhCSR3S (ORCPT + 99 others); Fri, 19 Mar 2021 13:29:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:34957 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbhCSR3H (ORCPT ); Fri, 19 Mar 2021 13:29:07 -0400 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-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-iHJfUg0VO4qn4vGlZ9zSvQ-1; Fri, 19 Mar 2021 13:29:04 -0400 X-MC-Unique: iHJfUg0VO4qn4vGlZ9zSvQ-1 Received: by mail-ed1-f69.google.com with SMTP id bm8so10035085edb.4 for ; Fri, 19 Mar 2021 10:29:03 -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=bbWXN0PDs+SVmJTmzT+S+ArjA+05kdtCpBsk+5qb8iSZlUuNuz8vZlTYxAo01Zfnnd miLItjAeNf/EkzKcpsu0fZSdTfAqFojPUlTQBWSowCQ2PBA9NTQ54S3+FSsARf5H9jY4 bHr2QesvlvtNT53mXnRrmCJ1vibgNKc0BWbLWrIkB6QRm97NmMxDTnFBb288ZTzTuo3x TaGHfkf7fHy+sLXqwrKOXi2l6SnVdmOlSYhB8SxNXuo7Jo0NCAoR/QxpF41g5aTlRWHJ XbbZaFmBZu/l6eRwSxzHe3Op/rvTmyuFZk7NUgCWMvszjZgaRRRa3YDthOoOzwVtpAz1 wHpQ== X-Gm-Message-State: AOAM533MDoxA8nrdcYYdqMr8Y0QVxAGpgZwysFcIcBhPAUvF1E+U0iuC EtHoOWQKy5Aw5hcwMOiaOHRcsBaOs47rQ387eTBK0fmd5gDn2i0Hcu+0GwlJDkyMIyl6PAJYQ0I oZOgW3rb45xw58Hr4T2qqGTg= X-Received: by 2002:a17:906:4705:: with SMTP id y5mr5719793ejq.119.1616174943004; Fri, 19 Mar 2021 10:29:03 -0700 (PDT) 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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