From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 1AED04582DD for ; Fri, 7 Aug 2026 21:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786139982; cv=none; b=iQhi7F/VBOyilfF8laH6UZTXirlekecn1quMVKHhF5ZQjV6MbMXld8uRjD+kz5fTsTe8uHSrUkyJRcaE02CBaKX68anVOVVj/6/3/GMnve+2VFu34MJHMYjC2sbSf/J/DULHAhyNdDpaB4QC+g5q9xL9uGdE+SD592zOInJdfNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786139982; c=relaxed/simple; bh=GyGFxOR/wEQxLVA0yatw8LD8kyT2r6Hn+IKFnrinyQs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nKGBV3YEhjNGphouAGaOWQiixTHM9BO3gr5rFbdMheAZWmJHPZACjo+hM6P98SFyMUUQxQfWSilPghsgUbIrtV+mewvyJY86YEaC/DBH4/TYzOQKYI+wL8ZDImo4OPtYmBWsm9fj8ZXpU76KkDFyVvSXdriA8VFr3ZG2q/n0QXA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=wDf4fvEL; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="wDf4fvEL" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wvuqynFpvLEv8znQBXI4u6NMqckqKnGj03gNbREOV2c=; b=wDf4fvELz43aS1pKGASazu8nBs gZ2KZsWvbbZDVqFvfxhk3i1g7gstTA9wvkiuTGaeJPn8V1ccb8R7S/KrfMex3RyJmDYJH5/pei8iU IT8TXQsIs5s4ZG/unNU08xCAUUQRvcpjNXgOAZh3GdzVWTt68E/mwtRFH7OmkZsO9Xxnh4lzcj+0Z 4wJmw2xP6iCSqcUHBdSXrmoktaBP51SNfiHI9OKJ4ASEJ1cJVQ8PvDA/Rs8rZImpxJg/76/BMHDnN UgnfircSjWDBds3GWNZSVGi6+d7hhEEQANggL4JmVAqADJxJpLTIIThDhvuBcdvL+qFDKdmq8CnI3 kKBwoVAg==; Received: from willy by casper.infradead.org with local (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsPjl-0000000DRxc-0jo5; Fri, 07 Aug 2026 18:56:09 +0000 Date: Fri, 7 Aug 2026 19:56:08 +0100 From: Matthew Wilcox To: Tal Zussman Cc: Andrew Morton , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , 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 Reviewed-by: Matthew Wilcox (Oracle) > -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) It's s shame this isn't const-qualified (after all, we don't modify the folio). That needs folio_memcg_charged() to take a const folio pointer, which it could. And folio_memcg_blkg_css() and folio_memcg(). That's a followup patch though.