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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5842BC197BF for ; Thu, 27 Feb 2025 22:43:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DBA30280001; Thu, 27 Feb 2025 17:43:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D437E6B0095; Thu, 27 Feb 2025 17:43:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE3C2280001; Thu, 27 Feb 2025 17:43:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9C7166B0093 for ; Thu, 27 Feb 2025 17:43:36 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4FAF281E73 for ; Thu, 27 Feb 2025 22:43:36 +0000 (UTC) X-FDA: 83167202832.05.1DB5B38 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) by imf03.hostedemail.com (Postfix) with ESMTP id 7E61820008 for ; Thu, 27 Feb 2025 22:43:34 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=gmLwKQqj; spf=pass (imf03.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.177 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740696214; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=URs3a90RZoxDVYTmfZjczkKABEzHifSbZDiB5wwZA54=; b=KHwZTQC3oEJ/ojKCp3qGvo5efc+FWPNWWgmXdzuPRl1GQLz7sCH1IgDupxbinVQfBODBz8 dNEb7jlD94ep7DrjfrCNuA3sb0+ucubCydTZoyKglKny9NGTvffFgB3ASTyWEZTeRg52Nu /k+lilOLsZwbIn0nWkbMLJiC1oVfdVE= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=gmLwKQqj; spf=pass (imf03.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.177 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740696214; a=rsa-sha256; cv=none; b=cu9VUABAT2nmn1PzQPXPL5r28lxj3GQRT9CqiYf8lDa2JB4sohEzJBFUIWELMf7FvHLkVx fXiAUUYgGFLBWsVTDMqi/BGL1eOkX1tWAJlFaXfx1nX1jK4fBK+tW4BfSsBuLCntWFk+C7 Y+6rTrExD4KnkH3/BoFjm/XkIXBoAOU= Date: Thu, 27 Feb 2025 14:43:27 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1740696211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=URs3a90RZoxDVYTmfZjczkKABEzHifSbZDiB5wwZA54=; b=gmLwKQqjNujd/DNdAsOazMqy3K4RVqjo06zUnH8vQJMI0oDcdgJsSh69RS9tjBRKX2URXN E8L/wuUoRPMGm20MJ7YKpUctN3Wy3RwhP+2ntEh6OLznevRtKWBFBKMkayXJ/LbqA8YPF0 RzTLctWss8eWVAVonftKoT437HamzsA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: inwardvessel Cc: tj@kernel.org, yosryahmed@google.com, mhocko@kernel.org, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-mm@kvack.org, cgroups@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH 1/4 v2] cgroup: move cgroup_rstat from cgroup to cgroup_subsys_state Message-ID: References: <20250227215543.49928-1-inwardvessel@gmail.com> <20250227215543.49928-2-inwardvessel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250227215543.49928-2-inwardvessel@gmail.com> X-Migadu-Flow: FLOW_OUT X-Stat-Signature: 7oghunujbh8q9bwduoio5q81786oo1w1 X-Rspamd-Queue-Id: 7E61820008 X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1740696214-83256 X-HE-Meta: U2FsdGVkX1+odWSlvuWdqHOD5sTlP0pMA5kbQAeEHTyTOEivygOj9ABLU00qNZKEz9vTEVkH/uV5oWiKO6R0hLqKMx3ZGlRxKNWM/Zo5xFDic05RPLDqp9PW0oysx77d9NXiJXpgKC1LsUWXteUDybSZryApkvjhXR8wsO9Q2ychPufQ226ZvMmAI1IrWFZowzVJtyzIPEMhEcKWA96fm0WGdimWH5N3ARyx4EJTh1NFINfUF8otFyVlDINxfLHZIPCekREgABt+VONIk2zzkJBjo7SV3mo16SfaBBMfoXSksC8cZOO2hiYAA0BbpBi+QnAl+tv7AJ11Y0WUtpHZIfQLtLCCBvOncW/i5fvQ6fXf2kl4UhyXDh+ABr7xrO1E+RiIxBdi5SzK8SdqaymYCsPq+wx6kdPTbYMv6Y3boQSlNd0dDNJUYFaUn11GZ9hc7z8jx9GjTC2O+StYhVXPLqXwu2cNiMqiaTiN8eGEzHiHo5TvlpV5Rr0LsecMVu80tJlzOQ1SW+Q/0xry7grePVOtQPRUcb47i3ZZVEbsW65AB2TBRhiKBktWZeTkLDVSyffDFeZdU/6B7/aXaiXt3rh8koScN+Pln8TdXG1aUC4JiTl0CF3uTOD5/JFO6/DDuiY3/T+J0s/l+L8p99xcbm8CFTR478HdZ9FnyerDahZ1detUkTbMKYOsIC7Aqu5ZB5ElA52SylP/L5fGBNCq3qKRndNLIC4IrWUmIvvyJR/D3AeRNPrrobGbWh3NxvpPNTfftbsCOzuwBCzw0YW/Ew8n30u5SbxNigAqlXgGMA0MfFn7xKGiSvBxzOw82UCd9gxmStpzfVwj9ozWFNRg0aCXR6wXxwLW/q9MdhhXz1mg8aealHs2Cyj76Low/tglxIz3ZBUDmUrEIFdacxQ9psQffvGSU5+bo0ErzIeoHpIIRSOLAziiCf+4+ZSSI1OlbGomaVUdEhmUOZlQbfZ uUfVJv3V VNpSoQkHs2o/xzE6JMUhgIiLw6/UA5Zso5drD4o7GgL/8TSrjLdLBoE0hfIRZi9Mn45MRQfQLL6UOsUHzu5kQwbR5OzoZ8Z3byI3LnMCO3sgr40loORO83MDoyFkzQ8gYlpU+FlurtfYp2STJKNBV3gO2UQcOJiwbuiVXpC0NKxzEHo8SH3F6md2cvCvX5ReUUv8JOo7iHythxT9jmEjT+20Se21PH4lDx7L5fM0mtwzOW6w9s5vpjH01Cw== 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: List-Subscribe: List-Unsubscribe: On Thu, Feb 27, 2025 at 01:55:40PM -0800, inwardvessel wrote: > From: JP Kobryn > > Each cgroup owns rstat pointers. This means that a tree of pending rstat > updates can contain changes from different subsystems. Because of this > arrangement, when one subsystem is flushed via the public api > cgroup_rstat_flushed(), all other subsystems with pending updates will > also be flushed. Remove the rstat pointers from the cgroup and instead > give them to each cgroup_subsys_state. Separate rstat trees will now > exist for each unique subsystem. This separation allows for subsystems > to make updates and flushes without the side effects of other > subsystems. i.e. flushing the cpu stats does not cause the memory stats > to be flushed and vice versa. The change in pointer ownership from > cgroup to cgroup_subsys_state allows for direct flushing of the css, so > the rcu list management entities and operations previously tied to the > cgroup which were used for managing a list of subsystem states with > pending flushes are removed. In terms of client code, public api calls > were changed to now accept a reference to the cgroup_subsys_state so > that when flushing or updating, a specific subsystem is associated with > the call. > > Signed-off-by: JP Kobryn Reviewed-by: Shakeel Butt One nit: add couple of lines in commit message on why removing the padding from struct cgroup is fine. Most probably the reason to add the padding is not valid anymore.