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 CE9BBC433EF for ; Thu, 2 Dec 2021 16:31:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F5206B0072; Thu, 2 Dec 2021 11:31:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A37F6B0073; Thu, 2 Dec 2021 11:31:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46BBF6B0074; Thu, 2 Dec 2021 11:31:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 3962D6B0072 for ; Thu, 2 Dec 2021 11:31:15 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DB8A28B30B for ; Thu, 2 Dec 2021 16:31:04 +0000 (UTC) X-FDA: 78873393648.28.D886127 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by imf08.hostedemail.com (Postfix) with ESMTP id 52DE430000BF for ; Thu, 2 Dec 2021 16:31:06 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id p8so787144ljo.5 for ; Thu, 02 Dec 2021 08:31:04 -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=yGi7LIeuTdgZBFGen8AUJZNWTMwudrol6LbQe/Ktdd4=; b=kx1WWPNOnTyu2Su02F81AoeoOYfuXh7LGJ97vrlfiXWYVAACw5Sf0CY23J47o6lDP3 EJpIk2t5t4/CXvC0UBUUa9sHppwc8pum5zDupnF2RJbwfR0wdkvg44koDf/TcHB9sMbh B0NpBbDIE896MiT2sev9n1Wwm85WCsoZBMjX4tLBZXuFCHoQrpONMPh7WPU1Vs9Dh686 VBksvf1VEilgKBupFH7Nvx4l/NNfPVS5+yoHqKZ+IYBYMoON4xKYgxJ443leQwbyf9WP RmzV3gPk/toknMAUaV0JCjyan1Fz1btLii2S8vSXk4fkucpMQGYfrfMiWCE7n0vW1z/9 WMuA== 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=yGi7LIeuTdgZBFGen8AUJZNWTMwudrol6LbQe/Ktdd4=; b=wYPR7R6JCXiZQJPYAtDKGdk29SRWsBjF1wigmLhmgQbOTiO4wfEvcHuPZbkpILhE3G X4UiAbCTPZtzR+rvFAolKDwiaWM0Eq0EhNbIxNJ0k9kzOydZ0xtt37wUZiRvl2j0g06q yCmMC2I65e5KFNQUMujp2R67FvME5BaQF2yJQTFJPCuFnLtO6EkyUL1v+Be0XJAWTtx2 3bWSsDnH7GdVhEt2JYvk5+CEZpW1A7ZnIZVXknlaDh6tVGP5Qdb+ZccOkB7Yzd9ZFuli BvNP1s206n1RqPrW43LPB2nE/yiwONzEqZmGPWTRsRnFZE0I5XSq8vi+h7Fwz9JSDm8U uU3Q== X-Gm-Message-State: AOAM533Uj27ekTLzfzCotzHKXsTCyEqDtw2DrC2MHH54xLiavk6GARb6 yFuiZrUkJGxcl6v6e2BWIm4XHAeS+MxZqVKH0dOrcg== X-Google-Smtp-Source: ABdhPJydE37/YC3YcGsTbHv6XoqsBV4zF8xWP0hW8aluolTigJtBPrZTQ54xcXdEgBBd2cEWf/4xlCJqVwEekjJ0BDo= X-Received: by 2002:a2e:bc1b:: with SMTP id b27mr12957864ljf.91.1638462662631; Thu, 02 Dec 2021 08:31:02 -0800 (PST) MIME-Version: 1.0 References: <20211202150614.22440-1-mgorman@techsingularity.net> In-Reply-To: <20211202150614.22440-1-mgorman@techsingularity.net> From: Shakeel Butt Date: Thu, 2 Dec 2021 08:30:51 -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: rspam08 X-Rspamd-Queue-Id: 52DE430000BF X-Stat-Signature: w91deyd5dcy6zr8zyuhjfgp5cp1ocnaq Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=kx1WWPNO; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf08.hostedemail.com: domain of shakeelb@google.com designates 209.85.208.180 as permitted sender) smtp.mailfrom=shakeelb@google.com X-HE-Tag: 1638462666-346992 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 Mel, On Thu, Dec 2, 2021 at 7:07 AM Mel Gorman wrote: > > Mike Galbraith, Alexey Avramov and Darrick Wong all reported similar > problems due to reclaim throttling for excessive lengths of time. > In Alexey's case, a memory hog that should go OOM quickly stalls for > several minutes before stalling. In Mike and Darrick's cases, a small > memcg environment stalled excessively even though the system had enough > memory overall. > > Commit 69392a403f49 ("mm/vmscan: throttle reclaim when no progress is being > made") introduced the problem although commit a19594ca4a8b ("mm/vmscan: > increase the timeout if page reclaim is not making progress") made it > worse. Systems at or near an OOM state that cannot be recovered must > reach OOM quickly and memcg should kill tasks if a memcg is near OOM. > Is there a reason we can't simply revert 69392a403f49 instead of adding more code/heuristics? Looking more into 69392a403f49, I don't think the code and commit message are in sync. For the memcg reclaim, instead of just removing congestion_wait or replacing it with schedule_timeout in mem_cgroup_force_empty(), why change the behavior of all memcg reclaim. Also this patch effectively reverts that behavior of 69392a403f49. For direct reclaimers under global pressure, why is page allocator a bad place for stalling on no progress reclaim? IMHO the callers of the reclaim should decide what to do if reclaim is not making progress. thanks, Shakeel