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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 CBBE6C433DB for ; Mon, 8 Feb 2021 20:54:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 10BCF64E74 for ; Mon, 8 Feb 2021 20:54:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10BCF64E74 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 691316B0005; Mon, 8 Feb 2021 15:54:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6406E6B006C; Mon, 8 Feb 2021 15:54:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E0606B006E; Mon, 8 Feb 2021 15:54:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 349E26B0005 for ; Mon, 8 Feb 2021 15:54:17 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F13AF1839B96C for ; Mon, 8 Feb 2021 20:54:16 +0000 (UTC) X-FDA: 77796303312.06.join11_0a07d3b27601 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id BB5D41005141C for ; Mon, 8 Feb 2021 20:54:16 +0000 (UTC) X-HE-Tag: join11_0a07d3b27601 X-Filterd-Recvd-Size: 4590 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Feb 2021 20:54:16 +0000 (UTC) Received: by mail-qk1-f180.google.com with SMTP id q85so3616048qke.8 for ; Mon, 08 Feb 2021 12:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WcpftL0I3Yn/sC6LOBOo9QXXxpF9jls61Dh3UGgrMhQ=; b=XGEs+1RNC81c2udolSMD/41WbwHBvqroEIblFLM6gl9MVclTdONeCq1jP0jJVv3DW7 dqvBGlfkyGoSaJOFPO4C+/KygXrMmF6GgeZV38oFelwD8bYgQ4Y9FaDxTNylaeEkxhxN 9/wMWF5GLFfZLkCkBzWMoFr2YsBTvzztvlTODSSdkywa0ZqSPz7MMES7R4ORrBwmRXAa inRSRsCQhcz07fMpBpDsQUbvvWjmpmN/ObDNeouvOi73LV0BXKKTABmritwmYEUUmzuj N6MX+1gkgsjC7cBc8+SIZf6tPoSoD/WIgebrPDZfgKnsLOKOtM1fzFUShy4hNgpDqfjO 8aOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WcpftL0I3Yn/sC6LOBOo9QXXxpF9jls61Dh3UGgrMhQ=; b=RAYs9nbNaWXSqTdRuIgsp5qD6pa3I6SYAY/kQdRgnv8mf51BvpSbNUax70wJtl/fKR tQ+QLfoAQ2MRHn8FuFHbewnPKuzmGCnNiutc/eNC+TXdI+BKE7Q5vjhscIkgEcFL9AB6 P2DW4fmWXo4blBRK7Xc2i+tHWBcCpzX+d/moK6+sDMTal5a0CPRejtAQePatOY4XIXN4 MAKA3p6VUDXs2gVQU70Xa4OAHpvLXZ426RG43dWUe1S/iIK8gPqx1MvPcUmOtU9ddET1 ulTupGc7kpIz7gLn3N4Y4S5ujqViyiEziyuENF0PXVB/ZTJ6OVaeC9ZlpWcGl+cPXLWd C6Zw== X-Gm-Message-State: AOAM530+p5RzCsQJUmeXtrQnNYJvFwYrgw4+kdI9O7qVkmqJIHLjWKIN LM4fowsbJMZ+xSDWuq30Vxj9qQ== X-Google-Smtp-Source: ABdhPJyVK62aBHf/AAc/vz/JS5ITM85XcG83LzKNHbywrxm4x9GiInjP9DCODQJEYHOwcUsfBKrnmA== X-Received: by 2002:a37:4a91:: with SMTP id x139mr2049044qka.102.1612817655489; Mon, 08 Feb 2021 12:54:15 -0800 (PST) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id 15sm14904060qty.65.2021.02.08.12.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 12:54:14 -0800 (PST) Date: Mon, 8 Feb 2021 15:54:14 -0500 From: Johannes Weiner To: Shakeel Butt Cc: Andrew Morton , Tejun Heo , Michal Hocko , Roman Gushchin , Linux MM , Cgroups , LKML , Kernel Team Subject: Re: [PATCH 7/8] mm: memcontrol: consolidate lruvec stat flushing Message-ID: References: <20210205182806.17220-1-hannes@cmpxchg.org> <20210205182806.17220-8-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Sun, Feb 07, 2021 at 06:28:37PM -0800, Shakeel Butt wrote: > On Fri, Feb 5, 2021 at 10:28 AM Johannes Weiner wrote: > > > > There are two functions to flush the per-cpu data of an lruvec into > > the rest of the cgroup tree: when the cgroup is being freed, and when > > a CPU disappears during hotplug. The difference is whether all CPUs or > > just one is being collected, but the rest of the flushing code is the > > same. Merge them into one function and share the common code. > > > > Signed-off-by: Johannes Weiner > > Reviewed-by: Shakeel Butt Thanks! > BTW what about the lruvec stats? Why not convert them to rstat as well? Great question. I actually started this series with the lruvec stats included, but I'm worried about the readers being too hot to use rstat (in its current shape, at least). For example, the refault code accesses the lruvec stats for every page that is refaulting - at the root level, in case of global reclaim. With an active workload, that would result in a very high rate of whole-tree flushes. We probably do need a better solution for the lruvecs as well, but in this case it just started holding up fixing the memory.stat issue for no reason and so I tabled it for another patch series.