From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 7DD9B448388; Fri, 14 Aug 2026 08:15:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786695343; cv=none; b=KSpI3p792LEN6n4x6ct2ec5B2F9WvPDerzRpIAl6TeTvQhtUqgkt0xKfHVPAyYPO3C33Gc/GSYSKhgscI29m3zV66GOb7xly+GL2WjEhRKNkpCUVP+jLGoRhXZLPznrmakvILptV5/DoCByiyQooSWpE07k1D+NshHg7mOVIZnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786695343; c=relaxed/simple; bh=JB32DLYALZLS4AXuuV0NyWqb6KOX2SUFTZ+RIuKwbCQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I/yfVZcljhMe3VT9NL/7GEM8irhYtdXsXFxDwuGQtYxJYbDMQvZFpISx3nIr6a7ogXfCdxoWwoK2zRHzWk+UAehR6s4y/s/TIKVdHeNF5EJJy66+2XWAs1Hj5SZAawRUGTbZkk+W395V+OiM4wFOogAbvoKZgmnSEqYiXSpzaI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id CDE7568B05; Fri, 14 Aug 2026 10:15:31 +0200 (CEST) Date: Fri, 14 Aug 2026 10:15:31 +0200 From: Christoph Hellwig To: yukuai@fygo.io Cc: Christoph Hellwig , Jens Axboe , Tejun Heo , Josef Bacik , Johannes Weiner , Michal =?iso-8859-1?Q?Koutn=FD?= , Tao Cui , Jan Kara , Ming Lei , Jonathan Corbet , Shuah Khan , Coly Li , Kent Overstreet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Benjamin Marzinski , Song Liu , Li Nan , Xiao Ni , Pankaj Gupta , Dan Williams , Vishal Verma , Dave Jiang , Alison Schofield , Ira Weiny , Andreas Gruenbacher , Matthew Wilcox , Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, dm-devel@lists.linux.dev, linux-raid@vger.kernel.org, nvdimm@lists.linux.dev, virtualization@lists.linux.dev, gfs2@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v2 2/4] blk-cgroup: use a request_queue rhashtable for blkg lookup Message-ID: <20260814081531.GA13546@lst.de> References: <20260811064744.1139446-1-yukuai@kernel.org> <20260811064744.1139446-3-yukuai@kernel.org> <20260814071232.GA9784@lst.de> 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Aug 14, 2026 at 03:50:04PM +0800, Yu Kuai wrote: > > Are these fast path operations? Otherwise we can walk all rhashtable > > entries without an extra list, but it might be slower. > > All users are from sysfs/cgroupfs API, I think they can be considered slow path, > however currently spinlock is held in these procedures, I think it's better to > convert them to blkg_lookup based iterate after spinlock is converted to the > blkcg_mutex. Sounds good. Maybe put that into the commit log? > > Please add must_hold and/or lockdep annotations for this instead of just > > a comment. > > > > Also maybe mention that this does not acquire a reference and the caller > > must already hold one? > > Perhaps it's more accurate that the blkg is pinned by IO or caller already > hold one? Sounds good.