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 056ADC021B1 for ; Thu, 20 Feb 2025 20:04:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B397280006; Thu, 20 Feb 2025 15:04:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9637B280005; Thu, 20 Feb 2025 15:04:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85295280006; Thu, 20 Feb 2025 15:04:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6617B280005 for ; Thu, 20 Feb 2025 15:04:12 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id DE33882CDD for ; Thu, 20 Feb 2025 20:04:11 +0000 (UTC) X-FDA: 83141399502.23.6B8F25B Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) by imf29.hostedemail.com (Postfix) with ESMTP id CA61D12001A for ; Thu, 20 Feb 2025 20:04:09 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=EKTyc5JP; spf=pass (imf29.hostedemail.com: domain of yosry.ahmed@linux.dev designates 95.215.58.178 as permitted sender) smtp.mailfrom=yosry.ahmed@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=1740081850; 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=yFmr3HO81FYdSZTDncLSYQG2DARQ+VMo12KXwJzsQb4=; b=2vOeRew0CiUM0xSLCq5pO0pKOdgl0GlIOTl+LyssiCpsGtYK3o0OQ/3w1g0SpRaGkRFW2k 7O9njsFm7t3OC0vZ71bntK/lsZhhQ6y9JAh3QTSdJ4dSEKn9MPIIRUF7jP3A+V8kbvdYkD FKjkxwASguy+SVEmy8HtLurYT6UQoYo= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=EKTyc5JP; spf=pass (imf29.hostedemail.com: domain of yosry.ahmed@linux.dev designates 95.215.58.178 as permitted sender) smtp.mailfrom=yosry.ahmed@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740081850; a=rsa-sha256; cv=none; b=BlPaVI9+TSFNl34NFKNSKT/mt0CnRZGdDQOYgT0Enpy8qH4zllcYNEo3y0O7Wici7Cz52t S3OpeMgxR0elBSrH42V6zxBA3vLP3QLZO6qaMPiWEiPXUvVlz2KHLVVjuZJmFypVvVPcB7 /Z/6u3d9iK7keoCPsUichxxUOHzLTAs= Date: Thu, 20 Feb 2025 20:04:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1740081848; 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=yFmr3HO81FYdSZTDncLSYQG2DARQ+VMo12KXwJzsQb4=; b=EKTyc5JPlQWmkW1o9MgF05ua99Z2xCTkHJadGrCVmNA5e3C8mz/yLapdCep2wto5o7jD7c Ce5PmBE0RqDKI2+cw+GN+tNOoB415NcwhMemssKyg6nLDFhrG6Mj/0kBcqhcVXw8zNmHSb 3YBr5JkfOzt+C9mkgfGB2SlKlyqjVeA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yosry Ahmed To: JP Kobryn Cc: Shakeel Butt , tj@kernel.org, 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 00/11] cgroup: separate rstat trees Message-ID: References: <20250218031448.46951-1-inwardvessel@gmail.com> <158ea157-3411-45e6-bca4-fb70d67fb1c5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <158ea157-3411-45e6-bca4-fb70d67fb1c5@gmail.com> X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: CA61D12001A X-Stat-Signature: iiwjq88gttphehphsk3d1b6tzgwdsyih X-HE-Tag: 1740081849-339166 X-HE-Meta: U2FsdGVkX19Kl/BB6XYyRt4AgdkR5iIyWMmhXqAEJOUaLF7oB4ZUM4ehOKMAqYAMHP1N4y+0LXMGU8isb2asERheUyOY/aNceXVdKenLNLResEuzE4ybYTEYHu4u0jPLyXqy/rqsVlDq8nB0QMvaKapXeHnXbNqJa0maC3JIui960jyKN7li4U4Gjjix+WfYPo+RgEDwcltxzq9eIsw84/xybBJfvt+aQ/46PO6SXm0eHtHZXMUE9IA8CD70wOtKgVzIXr/BkfhZ7m5sJjJwGkC9Qvestu7xL4UcLLINe8lKs/1Brv9zsxw6GWLzht7CS/2fIp0TcLzAc7pUefQlgHS3ywZ75zJbL7QSMiad7e6QuFkCrLQsCRqgYxKzSiIKwtxhRS2QaZjN+EaCADYMF9cXbRNgnNw3vsIuBz4CiecsjpqW8UFxO7v9CKS+VRw54XZM7jIUuc7Nwga9fdHhROXhFJoVnSBmRU/yqOrLRIGMm52+0ZFWUN3BngjXZWwCugd1082VwocAWythbznuzbeg6teAcyvN9RQGSJm4stJgpLZ/KVXTuNCz1Ejn2e+BWrQJ2kv90aFuG1v5q8ygt3lv4NkIRH7uc4QqozKPyErPWah0BACfQSQBHvVArWZz7zAECmYLT67iV1Y6+gtZFbRSTHnIxPWpIYTDiSP7GTzXnRbCMseFQ1ueCt2VQrB0hsjvgopJIxZJVurowt0s2/EOLLS+iEBG7NEGhpkrb/IYN3JhtTNtr4eErnJRwvXyLzxa2+3x/ACeu4UC7A3N6/7QC0zIB/iRsa8YABtCgWZEM2hd9iF8A6v4TEZ4gIWPw7Upw6Pu5mwuYK9TVbawO3l+QZzJUaWiIqNUIrxsvWOsmE3Ykz6qVJbsHV7oJI4zNuWli4F6cdvMEdk6QXRTkei5YXNJBFkwIPinsqIi4NAZ0luZA9AjaRH9phxt+1o3lnyPsotJGH/iAfKhmRD T/TVTWL7 FpK60jbxhHKW0OrfPf+cFjkNR1TkhYrZUwKUiAfH5k+pUYIup1a7koBoxDsnQRxCBP8yJ6lUTozpkqhzKVQYCDNkfNZTzyhzj05Q7nQg1InRqiDahh2kfAl8rnrAO+3qA4k2AHl9fP+oAztraE1z+XcUkzQXLPGqy8qKAaOD7dRMyxHGmlD/3EYFLyt0Zh50G6bXFwT9+Mx1ZKm5idoYQUdlI/g== 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 20, 2025 at 10:14:45AM -0800, JP Kobryn wrote: > On 2/20/25 9:59 AM, Yosry Ahmed wrote: > > On Thu, Feb 20, 2025 at 09:53:33AM -0800, Shakeel Butt wrote: > > > On Thu, Feb 20, 2025 at 05:26:04PM +0000, Yosry Ahmed wrote: > > > > > > > > Another question is, does it make sense to keep BPF flushing in the > > > > "self" css with base stats flushing for now? IIUC BPF flushing is not > > > > very popular now anyway, and doing so will remove the need to support > > > > flushing and updating things that are not css's. Just food for thought. > > > > > > > > > > Oh if this simplifies the code, I would say go for it. > > > > I think we wouldn't need cgroup_rstat_ops and some of the refactoring > > may not be needed. It will also reduce the memory overhead, and keep it > > constant regardless of using BPF which is nice. > > Yes, this is true. cgroup_rstat_ops was only added to allow cgroup_bpf > to make use of rstat. If the bpf flushing remains tied to > cgroup_subsys_state::self, then the ops interface and supporting code > can be removed. Probably stating the obvious but the trade-off would be > that if bpf cgroups are in use, they would account for some extra > overhead while flushing the base stats. Is Google making use of bpf- > based cgroups? Ironically I don't know, but I don't expect the BPF flushing to be expensive enough to affect this. If someone has the use case that loads enough BPF programs to cause a noticeable impact, we can address it then. This series will still be an improvement anyway.