From patchwork Thu Jan 23 10:37:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13948128 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 3CAF6C02182 for ; Thu, 23 Jan 2025 10:38:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 498626B007B; Thu, 23 Jan 2025 05:38:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 38C496B0085; Thu, 23 Jan 2025 05:38:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CAC786B008A; Thu, 23 Jan 2025 05:38:00 -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 91D3C6B0085 for ; Thu, 23 Jan 2025 05:38:00 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 576F2C0ED6 for ; Thu, 23 Jan 2025 10:38:00 +0000 (UTC) X-FDA: 83038366320.08.D50D870 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf05.hostedemail.com (Postfix) with ESMTP id 1C97C10000B for ; Thu, 23 Jan 2025 10:37:57 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j5OLBnpr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NUnVtHAs; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j5OLBnpr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NUnVtHAs; spf=pass (imf05.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737628678; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zwElIuMESkHawfK25L5K4feRdFtcRaanmIbm0q1JuoM=; b=ZmW6YkJeFCnpNkhoc88lzVixcuItIgdUbH89OTuLmxfwy8kHqTrfXtu3zN/iqgUR2X7VcL Vs3gTq7BWSg4LAH0yVcAC7Ra+yDq+RVvZD1fqDD6GLtdTFWyKEkJAXdn380JggEgigaYry TQ910vgZ+8q5+35wMZ0xRnDtWyzs0VA= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j5OLBnpr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NUnVtHAs; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=j5OLBnpr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=NUnVtHAs; spf=pass (imf05.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.130 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737628678; a=rsa-sha256; cv=none; b=Hdrv1UkFJKCk+QEgPXVuOXffbgB4hwKvvi2CASW8lrPabcL78p1pFuNEPog2VjPlrhFEz7 B17xbK5CerZl1LIVW3riCqess8Tzdv3SYEgLmlDzZdlV1yhOwshF1y0FF7p+vS2e6iSQp8 7xVATOQKZzNJFYM0vT4eNMDIIWHAWLA= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 531D72117E; Thu, 23 Jan 2025 10:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1737628676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zwElIuMESkHawfK25L5K4feRdFtcRaanmIbm0q1JuoM=; b=j5OLBnprbJ+Q9D1+Whj6Ma7EQzwCeCix17crcPsfU5C71LVEK7enHOn127kJlDVtAzEJvB wAwN7Iyls5Ek8x2EGrPg2d2QrqU0Fph3BQRjUcP8jUTvsOsTKK/D9an7ouKsIQIDInY8X7 iPVdjyKSUvbc/XixUwXGvJG6o7zRJjY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1737628676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zwElIuMESkHawfK25L5K4feRdFtcRaanmIbm0q1JuoM=; b=NUnVtHAs2IGVZeowl1Nhf5Fv+i2x3tGq2tq8SYA/Cb6vj1Payt8CtFwER0n7cf30oDxhU5 fOZLc968+jXNO6Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1737628676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zwElIuMESkHawfK25L5K4feRdFtcRaanmIbm0q1JuoM=; b=j5OLBnprbJ+Q9D1+Whj6Ma7EQzwCeCix17crcPsfU5C71LVEK7enHOn127kJlDVtAzEJvB wAwN7Iyls5Ek8x2EGrPg2d2QrqU0Fph3BQRjUcP8jUTvsOsTKK/D9an7ouKsIQIDInY8X7 iPVdjyKSUvbc/XixUwXGvJG6o7zRJjY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1737628676; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zwElIuMESkHawfK25L5K4feRdFtcRaanmIbm0q1JuoM=; b=NUnVtHAs2IGVZeowl1Nhf5Fv+i2x3tGq2tq8SYA/Cb6vj1Payt8CtFwER0n7cf30oDxhU5 fOZLc968+jXNO6Cg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3444313A5B; Thu, 23 Jan 2025 10:37:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gDt0DAQckmdrAQAAD6G6ig (envelope-from ); Thu, 23 Jan 2025 10:37:56 +0000 From: Vlastimil Babka Date: Thu, 23 Jan 2025 11:37:19 +0100 Subject: [PATCH RFC 2/4] rcu: remove trace_rcu_kvfree_callback MIME-Version: 1.0 Message-Id: <20250123-slub-tiny-kfree_rcu-v1-2-0e386ef1541a@suse.cz> References: <20250123-slub-tiny-kfree_rcu-v1-0-0e386ef1541a@suse.cz> In-Reply-To: <20250123-slub-tiny-kfree_rcu-v1-0-0e386ef1541a@suse.cz> To: Christoph Lameter , David Rientjes , "Paul E. McKenney" , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki Cc: Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , rcu@vger.kernel.org, Vlastimil Babka X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2762; i=vbabka@suse.cz; h=from:subject:message-id; bh=GC9uYdt4KS07fymuM3NSYxhL9MvirmkNR5XsSlOEbeI=; b=owEBbQGS/pANAwAIAbvgsHXSRYiaAcsmYgBnkhv8v39EUjnAdbXssma/HuIwh410GUk5XJsV2 aWJ2mS6tbuJATMEAAEIAB0WIQR7u8hBFZkjSJZITfG74LB10kWImgUCZ5Ib/AAKCRC74LB10kWI mlFrB/9XB0cSa+GSbLHOboEHSo34AX4MdVIdnULTltV8UqQGI2wop2o8P5LtVC88DvpKSnuwiDx aFVn9UiybtK/Xh/ObijyalPTc5mFJbKGX0lOzXmSICVUv+y1BLZU0lUaUsaQB0zl29+hX5QQx7A 0tZmYSmyW9KN8Ne16OyMmIRGv2xiUCSGw5U6G4Vgoz4OY5R9Kfyw53YQ3Is90JtC8YLI4pAR3Ph q/EoLopr0cGGRLPPU6lOc1ETjxum6oZBij7P2UhRdXXSJY7GnvQ2X76OUp78XdeszbMRiZcfDX6 qgr4Buktl+rhHR/4MLU0q4J5gnypiqHnXhyhwPJHH45PhmUL X-Developer-Key: i=vbabka@suse.cz; a=openpgp; fpr=A940D434992C2E8E99103D50224FA7E7CC82A664 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1C97C10000B X-Stat-Signature: g6ym7y516yhsma5u9fih13ninjnhy8rs X-Rspam-User: X-HE-Tag: 1737628677-634417 X-HE-Meta: U2FsdGVkX19hhy4B8L2MC0ARpkuOLrt1BcO8XzcR6Z25t0SaRhhJTzDGKJhtsJhCDHHB80Gw/282QRAw4nNDlbXh6MJHTe6V1Gq9OncYdxwOU/88f0aX8Abb6MI4Nm836oG9Lc18pFtymCGl9NpUUnSurhzaXQH2lnbTV3hBSq6DFccV2CN6+JElcO35cGDm8ACnTw7qS78/GuT1bKpw6Fsu6uh+a54St56MNhrzb991XFKheXKJmdFGo/481X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tdSJIMGmx/ZXPaQSa7/hFsh5/jhkRjEHWNltUxlSBw5wIAxJwyWz2SNw== 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: Tree RCU does not handle kvfree_rcu() by queueing individual objects by call_rcu() anymore, thus the tracepoint and associated __is_kvfree_rcu_offset() check is dead code now. Remove it. Signed-off-by: Vlastimil Babka --- include/trace/events/rcu.h | 34 ---------------------------------- kernel/rcu/tree.c | 9 ++------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index e81431deaa50b21725b08ad7c1a2992a0074065a..ac3b28b8939b78843aecb44bed8cb76c451ab060 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h @@ -560,40 +560,6 @@ TRACE_EVENT_RCU(rcu_segcb_stats, ); -/* - * Tracepoint for the registration of a single RCU callback of the special - * kvfree() form. The first argument is the RCU type, the second argument - * is a pointer to the RCU callback, the third argument is the offset - * of the callback within the enclosing RCU-protected data structure, - * the fourth argument is the number of lazy callbacks queued, and the - * fifth argument is the total number of callbacks queued. - */ -TRACE_EVENT_RCU(rcu_kvfree_callback, - - TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset, - long qlen), - - TP_ARGS(rcuname, rhp, offset, qlen), - - TP_STRUCT__entry( - __field(const char *, rcuname) - __field(void *, rhp) - __field(unsigned long, offset) - __field(long, qlen) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->rhp = rhp; - __entry->offset = offset; - __entry->qlen = qlen; - ), - - TP_printk("%s rhp=%p func=%ld %ld", - __entry->rcuname, __entry->rhp, __entry->offset, - __entry->qlen) -); - /* * Tracepoint for marking the beginning rcu_do_batch, performed to start * RCU callback invocation. The first argument is the RCU flavor, diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 6af042cde9727c8d7f7e3d88f26ba222d0d9c535..f3d5a9caebd9d0772931725bee93c1e172f8b6da 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2932,13 +2932,8 @@ static int __init rcu_spawn_core_kthreads(void) static void rcutree_enqueue(struct rcu_data *rdp, struct rcu_head *head, rcu_callback_t func) { rcu_segcblist_enqueue(&rdp->cblist, head); - if (__is_kvfree_rcu_offset((unsigned long)func)) - trace_rcu_kvfree_callback(rcu_state.name, head, - (unsigned long)func, - rcu_segcblist_n_cbs(&rdp->cblist)); - else - trace_rcu_callback(rcu_state.name, head, - rcu_segcblist_n_cbs(&rdp->cblist)); + trace_rcu_callback(rcu_state.name, head, + rcu_segcblist_n_cbs(&rdp->cblist)); trace_rcu_segcb_stats(&rdp->cblist, TPS("SegCBQueued")); }