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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC226C433F5 for ; Tue, 7 Dec 2021 07:15:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F0F366B0082; Tue, 7 Dec 2021 02:15:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EBEFF6B0083; Tue, 7 Dec 2021 02:15:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D872A6B0088; Tue, 7 Dec 2021 02:15:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id CA3FF6B0082 for ; Tue, 7 Dec 2021 02:15:22 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9351888495 for ; Tue, 7 Dec 2021 07:15:12 +0000 (UTC) X-FDA: 78890136864.05.39F92C8 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by imf19.hostedemail.com (Postfix) with ESMTP id 307F4B0000A2 for ; Tue, 7 Dec 2021 07:15:12 +0000 (UTC) Received: by mail-lj1-f177.google.com with SMTP id l7so25720612lja.2 for ; Mon, 06 Dec 2021 23:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JeLlEalXSQHW4pH2trtzzJDx6YYnAF08ckO/i6n2PyA=; b=SYj34d/hxJKfq8EbSGQE2cpAxSibC6df+us5qeCDougZMKek8E4/t6ldI2shF2MZnF 6UIphA+wzSY8hgwgCCx+mMA3w25N7z7n+oQyDpJZNdQcGSjsmHMCgcYOQ3j4mF/lfrCt W7KKBRZUT1Ar3N0hizzhJr/8MleLpp4BXs+ikkCrJCiyaMrs5lhP3g+lBjvokFFdVO0D zliqi/bBTOtRB5FRrsiF0rtcMzmG5/6skvbYHndDnafnzaybiBkG73gNYZVy9rBkIJYK P4A+pVYqf6oZ4vnzOgoTmyellVvHpgzEV4i2Hod3I75Q9hjkKLPSRj3chdCa4hLVp6AT La1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JeLlEalXSQHW4pH2trtzzJDx6YYnAF08ckO/i6n2PyA=; b=hAQJvPzPlC6D0e8TcgBCYKQd8QcZLfIb+hpoutHPJ8RFjjSR+hwxntNaheUGQxa5uU MWrylls9vy5JKq/bP5nJtprTqh+Y6E8sLSf5LY+2FTNZOGPY/SFcZl4KEGye2VUEs1sY 49wJyJiTuYggQEvZ1fiMZBHP4fClO/KAN8cPH/5Yo4mVKHnxv3m60w7ESLYxafL0P14g Byfru4yEOrerVD04jj0DKHMo3CRoIj+3tN2iCvMmYnN4YKrLStrTRxPkDE7hZPGxCPez SmT3KHHzSe5fNaxuz0UJ8bIHFEftBr6SCxooC3BN8zCBLFly8xfwgha4HhFQ+EQb6uAq neBw== X-Gm-Message-State: AOAM532C7PvUW5hrXbrl3gcaE35NucJBJLn5y7bFRVBDKgLXgFPvUJ+h R9AJfvObAAtafXvMiWC4KOQp7JA/IgeYoQ4eLn0/ww== X-Google-Smtp-Source: ABdhPJwD7St5XCs0KtsZ7B4kQrin00YT33yrHoQP8SuXlTurcS6UiF5SVM2kIX/jVUXjXi6ZmXrY/VK8VWLJc333RG4= X-Received: by 2002:a05:651c:1790:: with SMTP id bn16mr40860622ljb.475.1638861310287; Mon, 06 Dec 2021 23:15:10 -0800 (PST) MIME-Version: 1.0 References: <20211202150614.22440-1-mgorman@techsingularity.net> <20211202165220.GZ3366@techsingularity.net> <20211203090137.GA3366@techsingularity.net> <20211203190807.GE3366@techsingularity.net> <20211206112545.GF3366@techsingularity.net> In-Reply-To: <20211206112545.GF3366@techsingularity.net> From: Shakeel Butt Date: Mon, 6 Dec 2021 23:14:58 -0800 Message-ID: Subject: Re: [PATCH v4 1/1] mm: vmscan: Reduce throttling due to a failure to make progress To: Mel Gorman Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Alexey Avramov , Rik van Riel , Mike Galbraith , Darrick Wong , regressions@lists.linux.dev, Linux-fsdevel , Linux-MM , LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 307F4B0000A2 X-Stat-Signature: rfuywzk49w6sn85n3bpea56qctyz3dzs Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="SYj34d/h"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of shakeelb@google.com designates 209.85.208.177 as permitted sender) smtp.mailfrom=shakeelb@google.com X-HE-Tag: 1638861312-211570 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, Dec 6, 2021 at 3:25 AM Mel Gorman wrote: > > On Sun, Dec 05, 2021 at 10:06:27PM -0800, Shakeel Butt wrote: > > On Fri, Dec 3, 2021 at 11:08 AM Mel Gorman wrote: > > > > > [...] > > > > I am in agreement with the motivation of the whole series. I am just > > > > making sure that the motivation of VMSCAN_THROTTLE_NOPROGRESS based > > > > throttle is more than just the congestion_wait of > > > > mem_cgroup_force_empty_write. > > > > > > > > > > The commit that primarily targets congestion_wait is 8cd7c588decf > > > ("mm/vmscan: throttle reclaim until some writeback completes if > > > congested"). The series recognises that there are other reasons why > > > reclaim can fail to make progress that is not directly writeback related. > > > > > > > I agree with throttling for VMSCAN_THROTTLE_[WRITEBACK|ISOLATED] > > reasons. Please explain why we should throttle for > > VMSCAN_THROTTLE_NOPROGRESS? Also 69392a403f49 claims "Direct reclaim > > primarily is throttled in the page allocator if it is failing to make > > progress.", can you please explain how? > > It could happen if the pages on the LRU are being reactivated continually > or holding an elevated reference count for some reason (e.g. gup, > page migration etc). The event is probably transient, hence the short > throttling. > What's the worst that can happen if the kernel doesn't throttle at all for these transient scenarios? Premature oom-kills? The kernel already has some protection against such situations with retries i.e. consecutive 16 unsuccessful reclaim tries have to fail to give up the reclaim. Anyways, I have shared my view which is 'no need to throttle at all for no-progress reclaims for now and course correct if there are complaints in future' but will not block the patch. thanks, Shakeel