From patchwork Tue Dec 24 01:14:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JP Kobryn X-Patchwork-Id: 13919575 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 684BCE7718D for ; Tue, 24 Dec 2024 01:14:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A192D6B0096; Mon, 23 Dec 2024 20:14:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 99EC86B0098; Mon, 23 Dec 2024 20:14:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F2946B0099; Mon, 23 Dec 2024 20:14:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5CBCB6B0096 for ; Mon, 23 Dec 2024 20:14:27 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 25755140918 for ; Tue, 24 Dec 2024 01:14:27 +0000 (UTC) X-FDA: 82928080578.27.F070B8B Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf18.hostedemail.com (Postfix) with ESMTP id C2D621C0005 for ; Tue, 24 Dec 2024 01:14:07 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=W6mhAfRU; spf=pass (imf18.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735002847; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JF5+lUY/lcy3tq2Y5kiTvVdLllXSJTZSMxUiRf304xw=; b=l5h1p5pdStFKrsPsrn2iinLvoJkTbXLziwiYA/Zs61CZ6XXtjRx9K+xUe4zJNudXU+SORQ MvyqqbckivkRxkU2gj2wnT9vYE3YnXJ4TWlWj6VN1xCaxKLVU7mghsCMVKfyDbNfq93kJQ qx7FF5skVQV8VCEvA7HSJj/cSFNs0fA= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=W6mhAfRU; spf=pass (imf18.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735002847; a=rsa-sha256; cv=none; b=pppgpCOyMIKumV/0Jzgb/rnAoUj16NQQ8dWOVmRLkjGv1RHlc+h2KJQw2RomGEv3Ell0Ec ZadwY9SlY+L/eiqO03YCHusfBZaGsllJkpbrBaPWsR8SghuG2lkYTVBD9LW2J151Y0bugS FgR7F6vqW6NLIqe4oIPF0xYT5Bxko9k= Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2ef6c56032eso3308353a91.2 for ; Mon, 23 Dec 2024 17:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735002864; x=1735607664; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JF5+lUY/lcy3tq2Y5kiTvVdLllXSJTZSMxUiRf304xw=; b=W6mhAfRUkrp2X0OHQde7RL8UxbkTo/8+SgVqpXaspl4Jo+YPHn9oP1/ZlX+SzrWwPW yFVuO6d5RJIt+TjtlcL8QbCg1P5ZKpkEmuSU3IHlFd6tTt213dpzEBwoew15dpT9luCV xCBpp4HykdW+LuOiSKSZLiCSFW5GOvVBHlxWz4lJlPG9FxGpzNCQKKC5+QLu7kG0ft/W OvHRAHhNRJwEBhAOL6jtTfhQFMPxSm0rP8qIGsWMhn4un8QiVPz7mAx9k5Bj3YVGYDv3 sNHtn7bIDG3oCtO2eQDaLbaDDHSmmZLLibhOveWZmfxDk1iCo7+5rxfKVlQ5XWFGfeeW VeiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735002864; x=1735607664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JF5+lUY/lcy3tq2Y5kiTvVdLllXSJTZSMxUiRf304xw=; b=RjP1O2wRGZIsN9w8Hn4X223Br/M57BQoEykx6oyGQel1CBBT1XHFwJpYQkOEz/kTMd 8xthA49rzHW5avL2/SsJPwz+EsZg6ZlwuqHJyiiVq9gd8+6eYHV2T815KDIzzH83KLvw U75d6UBmWDKxRlE152+bAp0ngUq8/b3g7AJ+0iK5UrSXajQY9/QHi+bI3h8Tp+GfbPdT B3oNqz/mhYsDDCRf4VSCdSw+MIDaj6svADOyfzTf6gdQRqKcGHnfx60cucTJPjv0nYFj NHzBKqdXuybSzJnY03hcKnNIjXcnzkV2rl2ElwPwPxTtJKKCBncBDSXEf5C4GicILsTY 9DEg== X-Gm-Message-State: AOJu0YxgFDnKeCTBX69GFnvRJjW9KGuUW/JFrI+5zG1pDI0d8nTbnMqS w3Fo7IhrjnKqR65VeaYHywCFrmvfh8PUQYuC2BimUSeKPktY0kMqo3v69Q== X-Gm-Gg: ASbGncsaub30uc7YlfrhKdmE/tqlgmap8wErMse0yHC7wJAXB6GV9pA05gyeThGzR0l 67sgOh8mLBF/uC1kFYgb8LDBoC9CQ6cMRyzb5EW0NzcpRnSJ67gd6mucPHC3gh9FX8b+UBHgvFp Ebjn5zdz4es+qI8W1CHreqrZ6cz2OHb41rYgurcba28PvgGPJLAaT8lItgDUIkYX/qw7WBP8Ozp evqVBEC8sVgCo1KwwBYj8knWoK+HAmgcbvOQPMLH98RraBTCcUdAeF9H4gDJaDahiq9fOAaApeQ 5P3umWWttPkL0LlKgQ== X-Google-Smtp-Source: AGHT+IESNbkbhfztvX6YzHV2B4TGbaIbNOhCOeua4C6yql386xi6jXCF50xnvVGI3HxJdfepwaKGzw== X-Received: by 2002:a17:90b:2545:b0:2ea:3f34:f18f with SMTP id 98e67ed59e1d1-2f452e49630mr22512064a91.19.1735002864134; Mon, 23 Dec 2024 17:14:24 -0800 (PST) Received: from saturn.. (c-67-188-127-15.hsd1.ca.comcast.net. [67.188.127.15]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc970c84sm79541255ad.58.2024.12.23.17.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2024 17:14:23 -0800 (PST) From: JP Kobryn To: shakeel.butt@linux.dev, hannes@cmpxchg.org, yosryahmed@google.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, cgroups@vger.kernel.org Subject: [PATCH 8/9 RFC] cgroup: remove bpf rstat flush from css generic flush Date: Mon, 23 Dec 2024 17:14:01 -0800 Message-ID: <20241224011402.134009-9-inwardvessel@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241224011402.134009-1-inwardvessel@gmail.com> References: <20241224011402.134009-1-inwardvessel@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C2D621C0005 X-Stat-Signature: ugzmm5yzgnj4medkr69zo13uag4gxnyu X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1735002847-591764 X-HE-Meta: U2FsdGVkX1/I45ztTTJJNrDXYyX2Chyk7DFHYGgQXU01nRRcvVul6wDSzwt8gurdSVTON9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Jmz7yLOmRWVusRGRrvdvuwNwn5K6tHsF9StkcXabPyTc8FVMdJdFsUvgRZl1AdrOWEb3wzj3GhAI9tDNKSMVoCe7aiBe/zL6g413oU4y/zXIzN46PDI5OXxsMc2Wc1jqItiBx2GNvqvywgqIBoyeTpVkGMX7cEHPPp1CIRv5lKpw+jgtvAzicdZMIb96d/0XUN9MWST2mp7+2yA== X-Bogosity: Unsure, tests=bogofilter, spamicity=0.477346, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Remove this call from the generic subsystem flush. Leave it up to bpf programs to manually flush any subsystems desired by using the kfunc cgroup_rstat_flush(). Signed-off-by: JP Kobryn --- kernel/cgroup/rstat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index c52e8429c75d..03effaaf09a4 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -346,10 +346,8 @@ static void cgroup_rstat_flush_locked(struct cgroup_subsys_state *css) for_each_possible_cpu(cpu) { struct cgroup_subsys_state *pos = cgroup_rstat_updated_list(css, cpu); - for (; pos; pos = pos->rstat_flush_next) { - bpf_rstat_flush(pos->cgroup, cgroup_parent(pos->cgroup), cpu); + for (; pos; pos = pos->rstat_flush_next) pos->ss->css_rstat_flush(pos, cpu); - } /* play nice and yield if necessary */ if (need_resched() || spin_needbreak(lock)) {