From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-81.mta0.migadu.com [91.218.175.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86D5645A28E for ; Mon, 24 Aug 2026 16:51:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787590280; cv=none; b=CtWekcr5rGNCBx1KSnEb9g0leuRL+yUebakRlVv4L1JrFC6GxzTxvw33ZaO45m9XSKLiNgVIIGHQXqCKHmh3ic3DLwnjXJaWIxTJ9KcVmO2o5AyRs5F6FZAvLaS4vkv9DLsjBOjOZf/0RnZmD0P8mPXiXxY8hs8LkBMH0klYqCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787590280; c=relaxed/simple; bh=PV2zLJMeUDfjBLQlhAwSR9WqLY4Agrz21Du2BoFyGno=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WVmKGt4cG5CnTVFxibbWUZ0u9Rud6S2HB6B06yNRGpbejstICBo+Hu3yLKfXW8Fk5Pr3xqFAKF6hcMvwb1JXDN/7x1qMS8LmMwtxDX17q8ZrkVcSljKFxn+IcYg52Kv4PO+A0azOHlnLJT0YnCjHDVAmTLnZbnnDfFvp3oozofE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=l+ThLLPl; arc=none smtp.client-ip=91.218.175.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="l+ThLLPl" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PV2zLJMeUDfjBLQlhAwSR9WqLY4Agrz21Du2BoFyGno=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787590274; v=1; x=1788195074; b=l+ThLLPlPVoch9kUhuFTsZdGTJH14lVIMrgwBLchDY9wgqPhxYmjXn2P9mu3uB964/rZJRuw KDBpGVYvv1pZadY4I+Vm48EZWb5ey7iVaYVe5J3lpqZmQ4ACnpiwmP2MWY2GUDSmxHZdH20H+kc KUZoELVJpg2BZ7NSqC2NGZHc= X-Envelope-To: linux-kernel@vger.kernel.org Received: from localhost (2a03:2880:10ff:53::) by smtp.migadu.com with ESMTPS id 1cfc0863f37e0941; Mon, 24 Aug 2026 16:51:14 +0000 X-Mizu-Trace-ID: 1cfc0863f37e0941 X-Migadu-Flow: FLOW_OUT Date: Mon, 24 Aug 2026 09:51:12 -0700 From: Shakeel Butt To: Hui Zhu Cc: Andrew Morton , Kairui Song , Qi Zheng , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hui Zhu Subject: Re: [PATCH] mm: workingset: account MGLRU pages in count_shadow_nodes() Message-ID: References: <20260824091631.836473-1-hui.zhu@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260824091631.836473-1-hui.zhu@linux.dev> On Mon, Aug 24, 2026 at 05:16:30PM +0800, Hui Zhu wrote: > From: Hui Zhu > > Commit 7404bd37cfbe ("mm: workingset: use lruvec_lru_size() to get the > number of lru pages") switched count_shadow_nodes() to > lruvec_lru_size(). Instead of adding more complexity and increasing divergence between classic LRU and MGLRU, let's fix lruvec_page_state_local for all. Usage of lruvec_lru_size instead lruvec_page_state_local was mainly due to concern on adding upward tree traversal on stats update side i.e. get_non_dying_memcg_[start|end]. However offlining should be rate. Let's just use get_non_dying_memcg_[start|end] everywhere and not just v1 and measure the impact. Shakeel