Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp136414lqa; Fri, 26 Apr 2024 17:52:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJW198sHC1I5jk7JyL4vTAiWrBghn/anLHd8GrnE0oXGO8IC+7hiUE0g//dA09MmbvQXOLy4xixzPR6DICZ9/Lmj91Jw2P54BXKRm2mw== X-Google-Smtp-Source: AGHT+IEUmcHwLS8Vj7quKn06VZyLwSA/GdX/Idwv9u0FpqlUtW1M796fryHPbBJ8bd+Y2mC9wEJk X-Received: by 2002:a05:6a21:7885:b0:1a9:6c18:7e96 with SMTP id bf5-20020a056a21788500b001a96c187e96mr5574779pzc.19.1714179128683; Fri, 26 Apr 2024 17:52:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714179128; cv=pass; d=google.com; s=arc-20160816; b=xbLCBoQusSekEa4JoZ8gN0jocCI1E6OWAUPXQuMEG6VRegmtR8toJyS+vjPDbC0Rwu Qk1+6uWrZykU0OmRCgxN82mVyCkjgIijOqQa8UUcOn898kxLok6dnpCTEn1I6k1cWgTk nx5w/FwGSGEhkyRv6mm4KBaU2a/fmc8B30MOdSXAZrpaZSFa6qkutEfFC1hWu7rK5h1a Ad9br8q8tITwC34hVA1ShVsVF9WTFXdHzaFQRR8ju6/JyNmzR264fVUPSF547Tir5+UF ZJq3veuwnzniZC29WXd8ioJha1MJmS2vUmP426dcA4xNpyk6Q81JZFbOQRXsDsNUu0Ov NQgw== 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=fUScy4CDQzemTknfjsfZBWJBSrUtTixdIVJuNp4SGp8=; fh=l4X8OWvF9qWtMl93tnbMTdo0l58yDTtHwaFz9ArNbNM=; b=GCSKnkHDhqUnX234s52aLxMI47Sqtf7BstvGsrTtvNCagoVPqQc7TVQYE9W6ZTsOUD vLFonA6ZAN2zg3PnUr0lZAOIIwDEU680Qiul/OX1ou/wvwnVBrLsSOWsCJvoQiIuok42 Wco6ALABZeEXo4P9mdvrxKO6MPJ2pNWOhEvrtrkQlvxMkD/p6GSN07JyShpiaP3azlnd 16/PCJIurG0cnvLP3PhvKarOKHkezqlcXaDfS5y/4XwKNu8C86omUqOkyBLqVz7nKIyN lFzb6jtRpNDUdoHNScyHv73L6JEJ8ALyOdoHDdxlDSyHq5Rcs5Vft5xb0oFWsg5pt2LY 0DFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=idQK0hLN; 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-160832-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p12-20020a62ab0c000000b006edcb1f1440si15424584pff.353.2024.04.26.17.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 17:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160832-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=idQK0hLN; 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-160832-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160832-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D8DD282C1A for ; Sat, 27 Apr 2024 00:52:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB1A82C861; Sat, 27 Apr 2024 00:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="idQK0hLN" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 834F72CA5 for ; Sat, 27 Apr 2024 00:52:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714179123; cv=none; b=Di06hU2fiFE5Ki/NV8EdtDG0AvcslwW5dIJMh8y2op2QtnMrJzcRN4iPhZbxZ67YG8n+G2XCa/3KVSyWk4yiB5HBL1Vo5KtZaf+Hx61VjYpRKnvEmdeBglS6HBNyR9bsMhFuHMWZ7yd725QDP655jiXBidv2aFUS21zdXVSfeoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714179123; c=relaxed/simple; bh=fUScy4CDQzemTknfjsfZBWJBSrUtTixdIVJuNp4SGp8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QskQefjcqmamEZdKedlBUWNMMFZct7tYTxoF3VwNtpRjPEUtzFuUnzvzyiBuxRkFwiWOu6sBTXCxs+/UL8GsIZxMCRVHYPL5rWs6QkcE85I4LGMzc8GFFiW2aN8cLeCynniYxGgYVm9iWaW6ct0MLqJCzq6DLlZc4fJrzeIhDBQ= 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=idQK0hLN; arc=none smtp.client-ip=209.85.218.54 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-ej1-f54.google.com with SMTP id a640c23a62f3a-a51addddbd4so321982466b.0 for ; Fri, 26 Apr 2024 17:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714179120; x=1714783920; 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=fUScy4CDQzemTknfjsfZBWJBSrUtTixdIVJuNp4SGp8=; b=idQK0hLNdTDQb9ei/A3bZSwSfB09zG/8Kup2ObMSMnYvl9MF2jcgiF5KmUoMSIVqVN tZC6CHE61iBaG91QvparGrb1z0PdVFkWVjt8+4DKb2s4yEZXItIjwJomYv+rVDHfevKo QbaXYuC9UnsE1A4t8TBnGYq1DKWz/qZsJ8YarC4aIr1IAxFk8g9quHvSxTeNQ24Nx4hF WSFuE4BW53pMqyGXiY/qfzh1ceettJEct8CPlIlGwWmFd8PnATVdzs6NcDqaINnTkXXV +7S8fZSVJ66ohUcuPSvlAGDOtRU1coyiC0S8vUMPH865GV+qS1lOsBB5o8v07ws7wxE7 YrtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714179120; x=1714783920; 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=fUScy4CDQzemTknfjsfZBWJBSrUtTixdIVJuNp4SGp8=; b=dxdwWhaJoLB++oQpokAykrxD2jHqxdzjdg0CTYIqtK0mM/46Z8iIuOiFH9Pg2EevVH Yi7BGtAX4AUHOrsiXQqzNbJr6r3z6YjtJVIa0Jki8KtTXawhH64UhAKorTyOGJGCJwec TPG3ObrFBtunSzh8Nx1GDC4+0WDYfJAJQSedvpR+xLQ/ZuZ72k1WBxOERS1DflwQD9ak RH8FU4nZ/H2QfTzjYLDhAW0F93anYS50z8q4dzFKyLSbtqbwcE6D3cGuXO7nRZHWZX/1 ykkfADtcP8xeNc44F5LXvlsGgJI+N9Z3dogzCffcb685PqS14sDcmcfNG0zO+lOknrW2 /XxQ== X-Forwarded-Encrypted: i=1; AJvYcCXAdQIxigN9RFGwqzoTBHAx/8eUkNjHH3LUuo34v+soTOTpzhGbygKqzl3p//Mwk42Jaz+cIKf8nckb02aJmfMaY+PFmi4uKexvRSTI X-Gm-Message-State: AOJu0YxsCmdbwdQELOf3OhhtolFxpY2Y1tkinKXwCEXA3AQTGRsiaNnl KLITnYxpV3JOMQIs8pKKv6mVsMtvYY26xsxrClBhBvW14RwAff5wWWBtf6Q4NndyCFb7OIJ5Whm XOG40GTDYGotjJ/Sa+L8mRP3O8vDECv6qD4H7 X-Received: by 2002:a17:906:6a8d:b0:a58:308:274c with SMTP id p13-20020a1709066a8d00b00a580308274cmr2911288ejr.21.1714179119602; Fri, 26 Apr 2024 17:51:59 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240427003733.3898961-1-shakeel.butt@linux.dev> <20240427003733.3898961-4-shakeel.butt@linux.dev> In-Reply-To: <20240427003733.3898961-4-shakeel.butt@linux.dev> From: Yosry Ahmed Date: Fri, 26 Apr 2024 17:51:23 -0700 Message-ID: Subject: Re: [PATCH v2 3/7] memcg: reduce memory for the lruvec and memcg stats To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024 at 5:37=E2=80=AFPM Shakeel Butt wrote: > > At the moment, the amount of memory allocated for stats related structs > in the mem_cgroup corresponds to the size of enum node_stat_item. > However not all fields in enum node_stat_item has corresponding memcg > stats. So, let's use indirection mechanism similar to the one used for > memcg vmstats management. Just curious, does the indirection table cause any noticeable performance impact? My guess is no, but the update paths are usually very performance sensitive. I guess lkp will shout at us if there are any noticeable regressions.