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 54166C021A4 for ; Mon, 24 Feb 2025 21:13:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DF3FC28000E; Mon, 24 Feb 2025 16:13:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D7C4728000C; Mon, 24 Feb 2025 16:13:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1E9E28000E; Mon, 24 Feb 2025 16:13:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9F93B28000C for ; Mon, 24 Feb 2025 16:13:43 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2ADBE1601C1 for ; Mon, 24 Feb 2025 21:13:43 +0000 (UTC) X-FDA: 83156089926.01.AD12FBA Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) by imf07.hostedemail.com (Postfix) with ESMTP id 5A0C840008 for ; Mon, 24 Feb 2025 21:13:41 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OrK9uho2; spf=pass (imf07.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.184 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=1740431621; 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=Sd/z29n0XcTUSzPpHZ0vSyZb839BUcJwORjsci4MRHc=; b=eX246G6f6eI4RBPAZ/ToiWZCnqZRVL0kl/ozbff3Og1OcV9qYxCNHZ7bBJ2M+5xn/rYwiP 3acyXcFNb7LSqxG4T04Sb/L9hqD1sLN26g3QueoFRVkX5t+zaswCOZ/w1woAii60In9LMJ NDLiW4k03wMq+6u0MgDnal4NAZ1nYR4= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OrK9uho2; spf=pass (imf07.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.184 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=1740431621; a=rsa-sha256; cv=none; b=K1wNZJ7SgP6VNW1ZwQWeN433hoELXMY8o347ibqPVVcg17BbvOmPlHmmGsBolB/nvNFBoO j3ZEIQn0qiD/sVetYKMyeibURKdHT3uqHtkL5hZIbDLsBBP4DAF1/uruvGSBrZACs3uZ3/ Q3UVdRO3DPYpU3lB49N9m6IE5evWnko= Date: Mon, 24 Feb 2025 13:13:35 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1740431619; 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=Sd/z29n0XcTUSzPpHZ0vSyZb839BUcJwORjsci4MRHc=; b=OrK9uho21fWRb9hZFlknbWCZdTvv/IZ31vRqecxkZDAo/RNiJR36D53nmFvCzUCKUTaEbu 1dDwLkpbKBfS+nJX4UUlzE0qmvSuhlhd2mvjF400SGQxN6kSywPwzjJKm7wSvY/xs/48X0 Wo9VUc1YuOsGXLY4S8A6yRUaDbL7suM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Yosry Ahmed Cc: JP Kobryn , 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: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5A0C840008 X-Stat-Signature: qtfuryaj1477gapcai74uxzth13zcnfa X-Rspam-User: X-HE-Tag: 1740431621-433103 X-HE-Meta: U2FsdGVkX1+pT1xSEym7Gf0NHB7B27T4LB7xUomKmtCMS8TFrsAU7fcOHjcmjXqM03QCcvcqgJX7YlQouvEbZye+AZ3w5fK6/FYThdXch9GEw52iEmhv6hWy9MqHrr0mSOn8M+ysTtzXJr8GAwKqJmt/UziiquvnPOAOJ4eENhrs0MJyHPw1S2q+VzTcG9CMV4NevU507/0dqcpXWUu9sa0QM3MEFkXSieEZ0ufEIY2aMhB8qPu5oykOTXbPjb1+/ZWiv6GsJbPVvbkX9IhoPv/j8VYJnn+JH94SI1oCwxod2kHR/XxEOxGc+9TcHw1jUQZ82/IyLJwbASOyhKUi1Sa//bNYC83/zqb+xyECeZmnPD9WOJxp2zWa7/H3CSTvOEdZNGyz5JBfmj7BkrK0D9PgHW8kxhyaNWfyr0ESucVNnzWgOlPNb/mF0W+KoDPYSTmJSdqqgZsJO0+4ca8oNCO3+9n4KghdVwlt/IUJQ0JNcP6cqGtWy06bSrahrkoLRN8GFZIV6Cm5gzxtwADjq9o5yL0IRvQ07SxgU7lTXQfNN4ov10PYE55JYxPDxA900MADHrpXL1wxijel9yorUNyTTXUumEGodCgtGaq4w2kIPy6a3Vxi3S+BqjL6JtUV5cqeQVGCnVk/xXxM7vH98mFVE4Jqi6Fy1B3Fhe/TePV2LnfpE4ysfDLM3UL1aSiLSuk3qUQwPadKDxGDu6jFLOPp7i4ukYACDo+qaGnp3nYM+DqhTXd9aP+NaGjhCN5WUhS2v6wkG0O6hOhX4eUm6vwtgXkyWcEe+HwB3rToHd3i+D7ikhlFTiIVDPutpa05nSWgiVbX1OETiKyRC7heUHPJYVrmj3Y3VT14FMUHi10i8P6ZB0mX9izhUvBddt4lgEI4L2+UjBXt84K9WxWp2XRaDnAwmldZwdOjfgVfLb45E6gcia44k9s5EeQkF5YjdUzaEJ+Y47FuIRqWwB4 pE2GKQYN P7LXDZbXwcpT3aJowXzYelU6HCEopfWo6kKXvIsFgFEz3ZS7ACAYbDa8vM5AsrJkO6TzWCdkpFJNVBCqNbFtHqF+R9qAjvMJ40i70XyKYPqPbfNelQis0BZOtwbMG5yTFVTslujOJSasAYWeMKBct1bKFsrp27OU0nL5pA0gIav2Ll6oU0GCwyF0ycA== 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 08:04:02PM +0000, Yosry Ahmed wrote: > 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. If no one is using the bpf+rstat infra then maybe we should rip it out. Do you have any concerns?