Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2197215lqa; Tue, 30 Apr 2024 10:32:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbAcFbxUWgV5wDdx/mxeICN7stNbCr2Zm0sBwpG6iyClI6gA2zPpECfrm6hE0C6WYNWlF52CFzqolVY09bqKLTV+92LJkaTJFNuuHv9A== X-Google-Smtp-Source: AGHT+IHkFty4jYnHyGjVnrBL+GfUm/o33UiZygYIHyL40z8Zy4RJ0KZz3W1iSKlolL1btE08wIjP X-Received: by 2002:a37:e107:0:b0:78d:7558:27ae with SMTP id c7-20020a37e107000000b0078d755827aemr14910138qkm.27.1714498361579; Tue, 30 Apr 2024 10:32:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714498361; cv=pass; d=google.com; s=arc-20160816; b=pfMHc2mxHWv6t/uvD9XEOwxjdlLnK5e4CtMSn6D5Lx7B3BtNgIAHTD8HcHIEM/iEhB 4sQ5i81MVP8RH3RH0elQl5JBsHy3mmgJIjLj15mBFCSOmqTovntey1ffXdBPj4+qcg9N xTXxf0exJwEGhW8M3FSSCfui0jZHorXGilnbPym2rYHFApfLH0pjxHacUPXs6CYsa8C+ cR05z/WZqZqylPleyB0inwtMoXVoRBhBrebOcJnuiMAj4QkyymRo4EWEBHPiI+XA6HxE 3KMJxMq3eXvfux6BmI19yOXaHtyQl4wfEJHM+o3R6LvDvaDdtxZCEdlj7NEL6z29Wt9F vlYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=yW/DKRBIS4ATn0WcLDg63sbAJpcKsatVFeaBysHTbx4=; fh=uGvvSZ/gnTgHf+Rb4QSB1YsPlvyU+pJjtaZ1Z7hj5Zc=; b=L8lRp2X86FGZA8pYfFytQp7jt79Ieg8JoWOUDn8lWMNnVw5Kobg7ph2bJKajLUKBWn IvE5KKDirsklZ5P2bo+DlTz9mcooHCm2nKHDN5WgWx2JFL2415btaHyeKEeUzALK14Q0 d0nJygVTUJyxFmiQncTgOoqwdM+M00hpZmhB7zt58AB1aWslTpOKpZgooRsE4UeiT6/y +fCRmU+Mjg5h1BYXMMarZBDNg98gFlLcz35UpHpoiCa6A2U1XpvpSvSWrhzZ79VXYcI7 rzA0qaHSvl5APVeg24lpKvsTHddhPQ1Qeg+QYU1Ni2kKZPA4jI/FyV/EZloAJKutnTKc LXLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WYGlOYW9; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164521-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k21-20020a05620a07f500b0078edc3f02c7si29244970qkk.185.2024.04.30.10.32.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 10:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WYGlOYW9; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164521-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D62A1C2246C for ; Tue, 30 Apr 2024 17:32:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6C101802C0; Tue, 30 Apr 2024 17:32:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WYGlOYW9" Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (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 75512176FD8 for ; Tue, 30 Apr 2024 17:32:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714498340; cv=none; b=TiN9avxDi4hbUfcVMZ3GfpWNXh57I/Du27TgfSd0Z6KxVnEFj61gvCM4rQ1wW8bxi5/1T/Xp9Hqu82npYkCNy+ax0SL84+Me/XV26yrE6ujLByRmOFp5uDFrAudzubAW8kTYAoA25SBO6KcOHs19/UCOqNEf0MzN2esXZua8+nY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714498340; c=relaxed/simple; bh=/N1TeT8Lt6jMTRUZgsuQRBjbnAA5fXJw6oTciw8CL8Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=iRVMut6nKtgbDa0DilspEw45dpIiXhWLOi475Crvhez4pOwxMP6Fmd1idxSu3u1IcG6BXPUcGbpGGi522gEyUwl7VTNJHPvaHZdVAILv+XaXoI8l411nc9k02sqMoLdoLBDFlkAYSs20VSHNiwbupIQoDZi8HlXbMat3dDAUPH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WYGlOYW9; arc=none smtp.client-ip=209.85.219.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-de610800da0so1446254276.2 for ; Tue, 30 Apr 2024 10:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714498338; x=1715103138; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yW/DKRBIS4ATn0WcLDg63sbAJpcKsatVFeaBysHTbx4=; b=WYGlOYW9lrXLp0kV70aMtjPQqlzewAn9fM5oFblDVN8hIcDjkp0kwcX/IKuOw2iaRV IotSXy7s6Q/HZJR9DXW6tpy3s//fUWHTiihoTW9+9p987qd3adoWTWC/5KhEGDxy3euD S5idBJOU1pYIino8LZJXTteG5hkemFcRzGC/rtK66LWsCFAeWXlf/IkO/MHX87AgBDAc 9d1xWgYmcisWg1McydaqOlm7D4/YHUXOkyc2n/aE5VIyxtgK+hw1PXGDKF1gXYp9p8US aPicNMOsRlNyZST8M3zOCy4AEM+1zh5fvixWMVN4eYfsrcGzRqjarPUFfBfIfBdWC5vv EuUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714498338; x=1715103138; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yW/DKRBIS4ATn0WcLDg63sbAJpcKsatVFeaBysHTbx4=; b=gK3obvG72TFQaqlOEVlRw2MdaxoadNekF8vtRu4wJxyv9XZJNgSgXWI3yV4dYrtljj KOSU464aCuWkKq9xpyTFemIB81hyLp2HSdYvqFa/OCE527LXaDYI0ejg64DlGw1aRc9w KeVjP82/goppfiEt4+jcc5ybW2rT5ZpJ3bH5g0JefJ4vWKmWLxlzWL9y4X66jj+p7dV2 oSL7DGBB+C2L6Q7bby5ytq2pGvSoZ25Ka8rinPOVxJ8tZwvCUoMjR4YM/7OzrTX+knU3 O0Fc6o+YsClw411ZD2uTjTB+uAy6Gk2tuv8sbr7OyeI76ghDyShfmhrGntm558vko+E4 Pdhg== X-Forwarded-Encrypted: i=1; AJvYcCW+mnLdBwKlHUCSezvpSG4Rge4DhhvCXg+n4FrmHRC8sX9H3AW8QEMsqYVGxRsvzKRQZdptjWrVXYnhvBdFE6FYjpWlXFTdXH1RNkev X-Gm-Message-State: AOJu0YxlAcHiZkbZYjA9S+lXxQBCabpUwixZhNQhXeqivl+rpDz1w18N /TWgL0WbsNCb2pNPAzJNowPSoUxj7nkauocm70IjPIaXkYkbR0pPJEQAMaDQ21Ov3HY6SAw0wwj yeTliCj+SGNYw34ZxUW04oc0z0PTs/WhXKd4f X-Received: by 2002:a5b:609:0:b0:de5:5a39:2cb0 with SMTP id d9-20020a5b0609000000b00de55a392cb0mr184524ybq.31.1714498338252; Tue, 30 Apr 2024 10:32:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240430060612.2171650-1-shakeel.butt@linux.dev> <20240430060612.2171650-7-shakeel.butt@linux.dev> In-Reply-To: <20240430060612.2171650-7-shakeel.butt@linux.dev> From: "T.J. Mercier" Date: Tue, 30 Apr 2024 10:32:05 -0700 Message-ID: Subject: Re: [PATCH v3 6/8] mm: cleanup WORKINGSET_NODES in workingset To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Yosry Ahmed , kernel-team@meta.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 29, 2024 at 11:06=E2=80=AFPM Shakeel Butt wrote: > > WORKINGSET_NODES is not exposed in the memcg stats and thus there is no > need to use the memcg specific stat update functions for it. In future > if we decide to expose WORKINGSET_NODES in the memcg stats, we can > revert this patch. > > Signed-off-by: Shakeel Butt > Reviewed-by: Roman Gushchin Reviewed-by: T.J. Mercier > --- > > Changes since v2: > - N/A > > mm/workingset.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/mm/workingset.c b/mm/workingset.c > index f2a0ecaf708d..c22adb93622a 100644 > --- a/mm/workingset.c > +++ b/mm/workingset.c > @@ -618,6 +618,7 @@ struct list_lru shadow_nodes; > void workingset_update_node(struct xa_node *node) > { > struct address_space *mapping; > + struct page *page =3D virt_to_page(node); > > /* > * Track non-empty nodes that contain only shadow entries; > @@ -633,12 +634,12 @@ void workingset_update_node(struct xa_node *node) > if (node->count && node->count =3D=3D node->nr_values) { > if (list_empty(&node->private_list)) { > list_lru_add_obj(&shadow_nodes, &node->private_li= st); > - __inc_lruvec_kmem_state(node, WORKINGSET_NODES); > + __inc_node_page_state(page, WORKINGSET_NODES); > } > } else { > if (!list_empty(&node->private_list)) { > list_lru_del_obj(&shadow_nodes, &node->private_li= st); > - __dec_lruvec_kmem_state(node, WORKINGSET_NODES); > + __dec_node_page_state(page, WORKINGSET_NODES); > } > } > } > @@ -742,7 +743,7 @@ static enum lru_status shadow_lru_isolate(struct list= _head *item, > } > > list_lru_isolate(lru, item); > - __dec_lruvec_kmem_state(node, WORKINGSET_NODES); > + __dec_node_page_state(virt_to_page(node), WORKINGSET_NODES); > > spin_unlock(lru_lock); > > -- > 2.43.0 >