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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 C4E67C433DB for ; Sun, 14 Mar 2021 22:51:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 684F164E12 for ; Sun, 14 Mar 2021 22:51:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 684F164E12 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EE13E6B006C; Sun, 14 Mar 2021 18:51:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E90026B006E; Sun, 14 Mar 2021 18:51:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D31176B0070; Sun, 14 Mar 2021 18:51:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id B72C06B006C for ; Sun, 14 Mar 2021 18:51:05 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 69AEE181AF5FA for ; Sun, 14 Mar 2021 22:51:05 +0000 (UTC) X-FDA: 77919976890.07.B21B8ED Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by imf07.hostedemail.com (Postfix) with ESMTP id E459BA0009DC for ; Sun, 14 Mar 2021 22:51:04 +0000 (UTC) Received: by mail-qk1-f170.google.com with SMTP id g185so30015079qkf.6 for ; Sun, 14 Mar 2021 15:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yxi1lydKMWjN82a7Fd+FpDe2Rj0hmb6QP6tPPhMWVIw=; b=lYAu15rjfEJlPLMbYe3ofGtugJSP4S3UHE+XQ2ROBsoJg4LQfHnizFixBc5YdoamTs uhTOQr08O9J9XTN08NKAjSmAIF+fnn6HLff+3l7TV4BYtlks6BMGA3SxGeJQrVvvtLI8 YxQcz9zg+FA5ffcB/ehtLoT5A7se3VNKwTmkLsADvwUcu+HwrsTGSQx4j6EqgDoi8baT SdF21ARoje6bfWMFzg80oNj3JevhLX5lcXv1Hbz46SwVcnXvhs296sqLFKYxNyFWjj8i tztGUs6Ua4BJoSizUkVBoH4xDDG8oM5Gxms2Tq0W4Bdae10a8wEGsbKDfoz2QKuPLTTC egTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=yxi1lydKMWjN82a7Fd+FpDe2Rj0hmb6QP6tPPhMWVIw=; b=WTEQIf8npMJ0NKLq2JUTwoqsEQFB7wiH0XZqfGYigAf3u7ECHqblkvjne4wPGi8ZR5 cjeROSEDPf8tGXhCXVkmZ+dVVzR+Mls95DFZ9EoLH2wYyj5Az5m8rzNa/6nTpj55k9K5 LQfqS517fOIvd6GS1oqajlBRqSrpCxv9HJ3uozcgbDcF7FylNesLxQxnTpPi/EW/LD3p 3e+LqgjRSi2ogqzsPgw+4IiXkNkYUdexkwqh7/1662F/G4qbE2RQ26kh/2CrawTsb3hb 6ZyjgvYztiD7B9JAG4+e+q+sv97m8//mwYLr+goi/s9HVKzbeCG8L2GQHBVKRbJtlRc1 pyyA== X-Gm-Message-State: AOAM530YLplYFiXQsv5YtD+i7QI2JWnXJQM6nkCoQ0FWwvW/1a22VPNF q8wkmEUEXz1aFGkKyzEnpvY= X-Google-Smtp-Source: ABdhPJzGlY7vE2KKLHORP80o9phIQwX6iO8oRBseQCWbHWCL9pXUzz43G1ePZqigVxoExad+Y65zZw== X-Received: by 2002:ae9:d60a:: with SMTP id r10mr22025057qkk.411.1615762264070; Sun, 14 Mar 2021 15:51:04 -0700 (PDT) Received: from localhost (2603-7000-9602-8233-06d4-c4ff-fe48-9d05.res6.spectrum.com. [2603:7000:9602:8233:6d4:c4ff:fe48:9d05]) by smtp.gmail.com with ESMTPSA id l129sm10803181qkd.76.2021.03.14.15.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 15:51:03 -0700 (PDT) Date: Sun, 14 Mar 2021 18:51:02 -0400 From: Tejun Heo To: Shakeel Butt Cc: "Huang, Ying" , Andrew Morton , Linux MM , LKML , Mel Gorman , Johannes Weiner , Vladimir Davydov , Michal Hocko , Joonsoo Kim Subject: Re: [PATCH] vmscan: retry without cache trim mode if nothing scanned Message-ID: References: <20210311004449.1170308-1-ying.huang@intel.com> <87v99yvzq8.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 5jm17kb3t4a3a3gdm94nfnnipsfc88n7 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E459BA0009DC Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=mail-qk1-f170.google.com; client-ip=209.85.222.170 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615762264-487685 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: Hello, On Sun, Mar 14, 2021 at 01:58:33PM -0700, Shakeel Butt wrote: > > If my understanding were correct, what Tejun suggested is to add a fast > > read interface to rstat to be used in hot path. And its accuracy is > > similar as that of traditional per-CPU counter. But if we can regularly > > update the lruvec rstat with something like vmstat_update(), that should > > be OK for the issue described in this patch. > > > > This is also my understanding. Tejun, please correct us if we misunderstood you. Yeah, that was what I had on mind. Instead of always flushing on read, have a variant where flushing is explicit and trigger that periodically (or whichever way appropriate). Thanks. -- tejun