Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2879431pxf; Sun, 14 Mar 2021 15:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzih2mIJhqauiGpMvA5cRZXKhBsCempwWVzw2Vc2guFqT2UjroORJcsy+VGA0I1JnS4IMD X-Received: by 2002:a05:6402:17e9:: with SMTP id t9mr26807258edy.211.1615762377862; Sun, 14 Mar 2021 15:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615762377; cv=none; d=google.com; s=arc-20160816; b=ZrrkOW59EWW8IV/fpeOzKbUKO72g+5c+tlE/qZ7lsonO8A5FRvI8QGZ56TD+fLdsEa NH9Ht7Nm4L0E1txKtqNworZPW4uGr+Q3dkE8kaPEPeG35EyJdqxREtvbhrQbloEjuV1n kXZ+bn//v6G9gNMOU6y+Undk95TCVQqFADu3Le8jWNwEbe6AKaZ97nZBCyd+es5m88Dk inG5DQy0jT0yKQaoZ+kuFRcQNI3SnnfKI5P2o3Gp3ZNnXRo1oQZO3psppLFvLCKa5lbi 8HzzbMGa29DL8E3xq6vDVJs9mqQpr9hGj4F7MEPhb9w0ZgsfwYroNFOr2IvHXC60F4gG iEMQ== 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:sender:dkim-signature; bh=yxi1lydKMWjN82a7Fd+FpDe2Rj0hmb6QP6tPPhMWVIw=; b=gZJYEAWhj2DXp/QANktG3vN/tgviRRs+8IPTkJ1XR2mph1TnARXOEMLiP3c93h3nkg TojnlmOzLAS5yG/DQTHqtDvBLCGgTxxBDs35ezGGq6JeFQUQguLNbSPqepZpq30Kavag Uamhpd3UBp0NHQx0Awv2wPYPkb6nNasEJVMjXswDpIMZAGiLuiFtwBMsogqY00E+0fM2 by2XasNIBAduvS2zN+C0lHC5hSzCtTUM6BkLiCOHH29KCmIjsvUSiOv8UumRZ5AbnD2m MfnFHkMTBF4y/11yG9B/4jDdvCZmLDjznyV9tlJv+if4kqw26vZ/CIHwuPIF9szxw4tA Re+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lYAu15rj; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qt26si9418092ejb.216.2021.03.14.15.52.35; Sun, 14 Mar 2021 15:52:57 -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=@gmail.com header.s=20161025 header.b=lYAu15rj; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbhCNWvF (ORCPT + 99 others); Sun, 14 Mar 2021 18:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbhCNWvF (ORCPT ); Sun, 14 Mar 2021 18:51:05 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFFDC061574 for ; Sun, 14 Mar 2021 15:51:05 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id a9so29982076qkn.13 for ; Sun, 14 Mar 2021 15:51:05 -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=QUMDGdbgyAlvq77eraK1MmQD9Wyc0RVK9FluwKlVmswY3FTPQSOgxS68qoScGzN3oo 4+noHtMbWq8lTn0O8YbUlTZrwdFpUiWb7K6Mc40Aij2uOFglCyzK+d3G3l7cbQ/38I4A XHQGea9hDo1MqUEgaaqC2OI6kI7skmQUZ849fkDphIaeNz2LMqrEs8190FEhXd6/WpAX rNHpLvjY2H1AMZk7ryTOWybD18iWqPIXZLolx5CUUdda+gvtX6FRaP4CMwPVqpM1BjLh MpkC8RM8B27u/tnt8hAQraXOF3gWTNybCp1Uewa8rSchPs0iUMx1UQ3dAz6b/aBwI0Io 2Ezg== X-Gm-Message-State: AOAM533NjKIBF5wDqa2CsM8TPpRKTiHl8brCeXRzg57t19e5Fu07dYSb ZaUSgMaXW7ubvht1VlQbrdnaP8RQ83llIQ== 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) Sender: Tejun Heo 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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