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 44D00C433EF for ; Thu, 9 Dec 2021 06:21:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67DF86B0071; Thu, 9 Dec 2021 01:21:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 62E276B0073; Thu, 9 Dec 2021 01:21:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F6176B0074; Thu, 9 Dec 2021 01:21:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id 3EB856B0071 for ; Thu, 9 Dec 2021 01:21:03 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E75C7894B0 for ; Thu, 9 Dec 2021 06:20:52 +0000 (UTC) X-FDA: 78897257544.16.120D1FF Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by imf13.hostedemail.com (Postfix) with ESMTP id 161C120002 for ; Thu, 9 Dec 2021 06:20:51 +0000 (UTC) Received: by mail-oi1-f176.google.com with SMTP id bk14so7353349oib.7 for ; Wed, 08 Dec 2021 22:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=mQ7hWd5y/cX7pLN703rPlCh10s+JfDxjIeGD1iE5U+w=; b=VVd/Vy0aUpLV0wPA3tkVRJTPDJumIspBWsIUMUZqp3ogZzhlejrhrOoacWWRRXOKBP 2z28YaLT09BCFeUkUE/GZKFsxieiuhxkBuJkE+L3PfEqi6CplG7A9tBKK2tZ2nLSC/6q wo4Orp1r0FrIv0piod0w/ATkSOGZI6qnoK2WPNPZaZDH7WX+yhjXACOAR0KUkAurt+2p 9biAtg6Vd/vWcAq0ysww0v1zO26wH6ZyQheczyWkWibHPulj/VF0oVCtKY0YQCu7KiS9 0Dk+TskA4as/z/+0PbT8KezyiZFQcvOTAYWepspIEcuwflYWqs6aF8NF7mrtRAXIj6I+ 44bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=mQ7hWd5y/cX7pLN703rPlCh10s+JfDxjIeGD1iE5U+w=; b=BHMjRL1kVvHNHWWRPQ67v5xFckl91TOjEtDVsewQhD9jqPi56F0xIO6Au6mZNIzpOB +yOmUjTXyOPhEuHRP3xW8hguR8rDqGhOHYiXSOtlEsSBzru6G7BGqxu9zIwjjoamNx4B hcMwgTwoXAm+xxPyDrP76JzAqc+uEJyEOF1mDp4PPVUwWldAmNsZ6cgyweTcKHEd5+MF ZXA3hVSaHy+TjqIUNNf9ix8OW4EFCH+Exn0GmkvhMeIuevxpNevsE+5zHn5sF92tOA7y O5gMQsuJo4nDm/6ot10qUAysBayAautptXewDuUtCAPIsUG5yDc+/HFh2hgYOtmL976U tiqw== X-Gm-Message-State: AOAM531C7W3Ud9xYBmXkVEZmz17oXenXpx3Dx+/14YJxT2kJ+7CgURLI Thuu8UZPlvbwJqGx0vTpSThN2Q== X-Google-Smtp-Source: ABdhPJw9OPID56vDdJCFPIcuD4PvDWMFAxEx/AK93Z9FXNeZLG/dSHWRSGT0eS42J2loD9GXN3YCjA== X-Received: by 2002:aca:2207:: with SMTP id b7mr4219069oic.24.1639030851177; Wed, 08 Dec 2021 22:20:51 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id t14sm919606oth.81.2021.12.08.22.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 22:20:50 -0800 (PST) Date: Wed, 8 Dec 2021 22:20:47 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Mel Gorman cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Alexey Avramov , Rik van Riel , Mike Galbraith , Darrick Wong , Shakeel Butt , regressions@lists.linux.dev, Linux-fsdevel , Linux-MM , LKML Subject: Re: [PATCH v4 1/1] mm: vmscan: Reduce throttling due to a failure to make progress In-Reply-To: <20211202150614.22440-1-mgorman@techsingularity.net> Message-ID: References: <20211202150614.22440-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 161C120002 X-Stat-Signature: snyb18i96q1rw8jaotfrh64idrka3iux Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="VVd/Vy0a"; spf=pass (imf13.hostedemail.com: domain of hughd@google.com designates 209.85.167.176 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1639030851-248884 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 Thu, 2 Dec 2021, Mel Gorman wrote: ... > --- a/mm/vmscan.c > +++ b/mm/vmscan.c ... > @@ -3478,14 +3520,18 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc) > /* need some check for avoid more shrink_zone() */ > } > > + if (!first_pgdat) > + first_pgdat = zone->zone_pgdat; > + > /* See comment about same check for global reclaim above */ > if (zone->zone_pgdat == last_pgdat) > continue; > last_pgdat = zone->zone_pgdat; > shrink_node(zone->zone_pgdat, sc); > - consider_reclaim_throttle(zone->zone_pgdat, sc); > } > > + consider_reclaim_throttle(first_pgdat, sc); My tmpfs swapping load (tweaked to use huge pages more heavily than in real life) is far from being a realistic load: but it was notably slowed down by your throttling mods in 5.16-rc, and this patch makes it well again - thanks. But: it very quickly hit NULL pointer until I changed that last line to if (first_pgdat) consider_reclaim_throttle(first_pgdat, sc); I've given no thought as to whether that is the correct fix, or if first_pgdat should be set earlier in the loop above. Hugh