From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 86DDF3C1974 for ; Mon, 10 Aug 2026 12:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786366659; cv=none; b=ru9yfj9FWef+sBC8UxtHeHaVs9bG+o6mFc4S0vImTaKwPxH9dg+8o3bpk6Xj8UH9FtGVy0Y7dBtI0P087eDAKPOCHyPW0nuhns4fWnziu0jWs8nm+KhkmWom+0cJdztBjy4kUgRXOMeqkmyI06aNPs7oah4i5j2T0vWkxZwKJGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786366659; c=relaxed/simple; bh=nPNBJXon0I0nv4I/PEky6ddxF5w6pPOKqCf8PXSbTPU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NJ75OYz6508huthUBOGY0eR206hxk8Q65dLoQqerngpH0mNNk74rKORzepcmKJ+jXEQb5pUIl3R5ngXe/COx4rSAsoLcQ6tHqQvluvq75rgNTnCIrdqOex3dUBH0pTspz761+G12kLWNCYdrjF3z/QwYxHFBENyXglJnfqXWlX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ig+b+sZN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ig+b+sZN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88DA81F000E9; Mon, 10 Aug 2026 12:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786366658; bh=7nEsiIljsOnwiqNJPeR59SBXjP5U5Vnellr86acHMk4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Ig+b+sZNILkr56gDnGvd+gfzEq6oaBqW/nqeXP0rI+XM2u9rVQo7Re2/XnKIG1RRt bpNfKRUeKJVMbZI2LafUyPKGKcdKLr6fHh9Bz/lQ7RAWGA844b3W/Mph4YPul+X4Nv a8lah/j8namaCU9T1N9E603HnIV8JRv9+IQDtlPIB432whEGIUNTctnq+jnWra9A3M 51RjdDJHBlw0Iml5CWCfa6zKHX+8jtQAXZbQK2l2u+4OC1vMVWC7h4pYXEKUf+p3Vz mCCWBu4H+k3PFJhOetXyZ/ffuB+jBMyiDmFyJkXsoHB8XDIH+o9SA3uzcX4HCXbtmW qEHMuD04vZ9ww== Date: Mon, 10 Aug 2026 13:57:18 +0100 From: "Lorenzo Stoakes (ARM)" To: Tal Zussman Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Matthew Wilcox , Christoph Hellwig , Johannes Weiner , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/6] mm/page_io: rename bio_associate_blkg_from_page() Message-ID: References: <20260806-b4-page_io-folios-v1-0-0899bac3b826@columbia.edu> <20260806-b4-page_io-folios-v1-4-0899bac3b826@columbia.edu> 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: <20260806-b4-page_io-folios-v1-4-0899bac3b826@columbia.edu> On Thu, Aug 06, 2026 at 06:55:36PM -0400, Tal Zussman wrote: > This function takes a folio. Rename it to > bio_associate_blkg_from_folio() accordingly. While at it, convert the > macro in the !CONFIG_MEMCG || !CONFIG_BLK_CGROUP case to a function. > > Signed-off-by: Tal Zussman Nice in general, thanks! Reviewed-by: Lorenzo Stoakes (ARM) > --- > mm/page_io.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/mm/page_io.c b/mm/page_io.c > index c6d0949b3f1e..8573f7b8967a 100644 > --- a/mm/page_io.c > +++ b/mm/page_io.c > @@ -276,7 +276,7 @@ static bool folio_blkg_can_merge(struct folio *folio, struct folio *prev_folio) > return can_merge; > } > > -static void bio_associate_blkg_from_page(struct bio *bio, struct folio *folio) > +static void bio_associate_blkg_from_folio(struct bio *bio, struct folio *folio) > { > struct cgroup_subsys_state *css; > > @@ -297,7 +297,9 @@ static bool folio_blkg_can_merge(struct folio *folio, struct folio *prev_folio) > { > return true; > } > -#define bio_associate_blkg_from_page(bio, folio) do { } while (0) > +static void bio_associate_blkg_from_folio(struct bio *bio, struct folio *folio) > +{ > +} > #endif /* CONFIG_MEMCG && CONFIG_BLK_CGROUP */ > > struct swap_iocb { > @@ -595,7 +597,7 @@ static void swap_bdev_submit_write(struct swap_io_ctx *ctx) > REQ_OP_WRITE | REQ_SWAP); > bio->bi_iter.bi_size = sio->len; > bio->bi_iter.bi_sector = swap_folio_sector(bio_first_folio_all(bio)); > - bio_associate_blkg_from_page(bio, bio_first_folio_all(bio)); > + bio_associate_blkg_from_folio(bio, bio_first_folio_all(bio)); > > if (ctx->sis->flags & SWP_SYNCHRONOUS_IO) { > submit_bio_wait(bio); > > -- > 2.39.5 > -- Cheers, Lorenzo