Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp103920lqm; Mon, 10 Jun 2024 14:18:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVd3ig3dK5iIfRAxpu8M+xHDVWzTNS020x2/qCCbf6obcG4M4+Kk4SSoPRGgk0aEyUNDsBlSt5t+DfL0izC783R9GTSt0V5KJanNeGDPQ== X-Google-Smtp-Source: AGHT+IGBFpqM3403SnpaZZH71kkSZOGFZ8WiyNvbcFEZ7YJfTgU0s6oHSMXk9IFV8pbB3PW3qm0j X-Received: by 2002:a17:902:db03:b0:1f4:ae2a:c15c with SMTP id d9443c01a7336-1f6d0396751mr121242805ad.45.1718054306601; Mon, 10 Jun 2024 14:18:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718054306; cv=pass; d=google.com; s=arc-20160816; b=V9XdxETOAJbK1gUikc6YGc5vt+2dpuUUR+WjHam6ggcxl0Fu4BITQ/MaAIWdxrvWZB CcNZNmt1wjK4pF36ugMsXw2NtNTsxX6Ge7ms2qhpNsTN9bYdA6sO7EbGKJgrRH+VbW+E g9OH8Y8qhJ6+E7OOeeW7DGy1kNejnjY0kP3fqHp/xb7LB3XG3XRZ4KfEhtb6pYsGIpfz XbVepVYFWizlOgTGCDz/kbtpZHAYdM3SfPUf5+CYjcMMto8mw4yq7Qt/MHZWH0xmr7NZ bm1IPzWsEQ0MP9/L9HhCkambi4NvJt2vmFyVncuWVZgA/lotDTWFPjaqpLGKZLxTgNDP eMcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=RxSdmrYzC1XxdFuDB2dn/8UcFPXnAkblXlgyRhrAwHs=; fh=VmCZHFHkk53AiWzpjc+GZutNIXqr9qTpNF0QTt3r/tI=; b=C0vb+NTi74z98L1kdxL47ggAi3F+B/pSvJrqRWlbB0dtn/EjhoYtzFt7g/sdo+J1qO QOw3H7cuQlyN7rKpuVlRik2zOCAC+oHO/P2x3gfSXsd4x0BCZVnL8ub3mFQddpdZ49NB ZiQZx9+cHq3+uCe7qYNbzkQxV+F8J3FkCODNFokP15TmwUchROQt8/joSLlPvtY7x8hb CfU/v1lwJywQp35g8BHa25zyzwSqZCHWwvFsORyrDvqnXJbtexOTyV8zqdFv8UBz18Pp luv3zHlXXWkv+A1Wds7L61AMjlDlFGy/biYHzg6ReZ1/vHpr4iErtOZMcglKKor5IE8l itww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208907-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f710069ed0si26850665ad.127.2024.06.10.14.18.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 14:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208907-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B000E282406 for ; Mon, 10 Jun 2024 21:18:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B34A555897; Mon, 10 Jun 2024 21:18:18 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 328CA1CF9B; Mon, 10 Jun 2024 21:18:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718054298; cv=none; b=F5b24PkU7ZVOPJBmYA3CP6UVnog7fxLprnwqORdW8YO5Dplb/kuoxsgz4Eff2kj0XOGMfJx7tN4GiHxBzZItuvAAAqf7y85kJAcJfVbaixel+AwqPsAnXC3HrG14ojdiflUF3QWonZnM9MxEgp+vilKSYaQEkeEJIGfbGskfyv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718054298; c=relaxed/simple; bh=ZaHiKnBxA77uwO2CC6i3ByS9yqvBQrlgoSu4iRF2odA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lBEEivF+W0R7APtSBi/89yeBjXW3GJT5NHIMBPvd4rUd5j2RH9he8MdKnLYiDkHuzm8igbXkTb07dvaEzH9UpLG33nfQZzfl+sQFS9mgG6R528wOYzb2MgQ6v3y7KcoAktdFuT3aWCFzTWeV7B7iCNoz6ks8XouGotrrE3gfmdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C4E5C2BBFC; Mon, 10 Jun 2024 21:18:15 +0000 (UTC) Date: Mon, 10 Jun 2024 17:18:26 -0400 From: Steven Rostedt To: Vlastimil Babka Cc: paulmck@kernel.org, Julia Lawall , kernel-janitors@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback Message-ID: <20240610171826.75cef33d@gandalf.local.home> In-Reply-To: References: <20240609082726.32742-1-Julia.Lawall@inria.fr> <20240609082726.32742-6-Julia.Lawall@inria.fr> <20240610112223.151faf65@rorschach.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 10 Jun 2024 22:42:30 +0200 Vlastimil Babka wrote: > On 6/10/24 5:46 PM, Paul E. McKenney wrote: > > On Mon, Jun 10, 2024 at 11:22:23AM -0400, Steven Rostedt wrote: > >> On Sun, 9 Jun 2024 10:27:17 +0200 > >> Julia Lawall wrote: > >> > >> > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > >> > index 7c29f4afc23d..338c52168e61 100644 > >> > --- a/fs/tracefs/inode.c > >> > +++ b/fs/tracefs/inode.c > >> > @@ -53,14 +53,6 @@ static struct inode *tracefs_alloc_inode(struct super_block *sb) > >> > return &ti->vfs_inode; > >> > } > >> > > >> > -static void tracefs_free_inode_rcu(struct rcu_head *rcu) > >> > -{ > >> > - struct tracefs_inode *ti; > >> > - > >> > - ti = container_of(rcu, struct tracefs_inode, rcu); > >> > - kmem_cache_free(tracefs_inode_cachep, ti); > >> > >> Does this work? > >> > >> tracefs needs to be freed via the tracefs_inode_cachep. Does > >> kfree_rcu() handle specific frees for objects that were not allocated > >> via kmalloc()? > > > > A recent change to kfree() allows it to correctly handle memory allocated > > via kmem_cache_alloc(). News to me as of a few weeks ago. ;-) > > Hey, I did try not to keep that a secret :) > https://lore.kernel.org/all/20230310103210.22372-8-vbabka@suse.cz/ > Heh, I didn't look at that patch very deeply. -- Steve