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 A4C34285CAA for ; Thu, 21 May 2026 14:56:25 +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=1779375386; cv=none; b=dfYOOPtr6sog7zYQEPriKV4AEgeMMT7k/U76nwFtj6FnRHbOPAg0s0BnbHbvv0/ynE6JFOerBUV3p1Q7AqYGEp1qiq0Xz6Any2ayVcJLHo9+X9+81wSexL2buxWwhmb1IVaqpjJ4gH5POFAR8IYF5cmJ7xknaLBDHq9yT6+yX1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779375386; c=relaxed/simple; bh=lOkZznlaDJd6b3PTlg5meNSo4iMpld1UN8fHPHzRmao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Un542itcosvNUk66LjCHh6MBaMbtCe05ucs3zw05iPohnFC/Lsgt5T25WAgDS9n6hGZfVK0x5BkPGZOKjTn5DQ+JwOeNbYgrxeVCdLKzEWoHO33MTsO9AHZmrpXcu1g4X9/dHjbSqdo3Gk7iavqxuYNsqkRPOOZV45skyenExHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kYi1YN00; 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="kYi1YN00" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B9A61F00A3C; Thu, 21 May 2026 14:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779375385; bh=UITWpdaqbmI+fp8vUpGC9W+rWwdbi7PzAOTS6vN0L7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kYi1YN00SLOx0SAxRVqjzzEEdS1bDGJ7OZEYKRWL8wpyEU4dETS28epa1mKmZCuBC MCRmZPQQQ6F+PYtAcHIr/LxNXDN/P5rUN/+CsikKdzxMf1+YB66PSTMn2iK+/tq8xH jGvW/qdgtimxel2c4S1+AvVyA4jdD8nRTTPYIf7Qi2q5j1QzG6o3K8aN0zVF9Rm2nB Kok/4Qe3jV6eUTHBd2FlWwQd1oSr85r6Bkh2i8CyYA/wh4GrH54DNM/vGl94pZYpMS 2o6KR1pBHDDSgYJKH5MKB/wGc3+ZUK4arPsAlsSQuc3+Mi4qfikI+KI4XA0TE/zMRK U5AO5wduKquFg== Date: Thu, 21 May 2026 15:56:19 +0100 From: Lorenzo Stoakes To: Thorsten Blum Cc: Andrew Morton , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Kees Cook , Andy Shevchenko , Yury Norov , David Laight , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] vdso: move offset_in_page() from linux/mm.h to vdso/page.h Message-ID: References: <20260521090655.160282-4-thorsten.blum@linux.dev> <20260521090655.160282-5-thorsten.blum@linux.dev> 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: On Thu, May 21, 2026 at 12:16:00PM +0100, Lorenzo Stoakes wrote: > On Thu, May 21, 2026 at 11:06:57AM +0200, Thorsten Blum wrote: > > Move offset_in_page() out of linux/mm.h so users that only need page > > offset calculations can include the lightweight vdso/page.h header > > instead of pulling in the large linux/mm.h. > > > > Include vdso/page.h from linux/mm.h so existing users of > > offset_in_page() continue to build. > > > > Signed-off-by: Thorsten Blum > > LGTM other than dropping the include below (maybe Andrew can do it for > us?), so: > > Reviewed-by: Lorenzo Stoakes TBH I'd like to withdraw this at this point. Unless a series can be put forwards that sensibly justifies this, not some random change somewhere, I'd rather we not take it. Also vdso/page.h is a VDSO-specific header by MAINTAINERS, offset_in_page() is really an mm thing so that's another reason not to move it. (A justifying change would show actually build time/binary bloat/etc. numbers + involve actual substantive changes). Thanks, Lorenzo > > > --- > > include/linux/mm.h | 2 +- > > include/vdso/page.h | 2 ++ > > 2 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/include/linux/mm.h b/include/linux/mm.h > > index 9cedc5e75aa9..d5c7f1ca80ef 100644 > > --- a/include/linux/mm.h > > +++ b/include/linux/mm.h > > @@ -37,6 +37,7 @@ > > #include > > #include > > #include > > +#include > > Yeah as per David Laight, we don't need this. > > > > > struct mempolicy; > > struct anon_vma; > > @@ -3023,7 +3024,6 @@ static inline void clear_page_pfmemalloc(struct page *page) > > */ > > extern void pagefault_out_of_memory(void); > > > > -#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) > > #define offset_in_folio(folio, p) ((unsigned long)(p) & (folio_size(folio) - 1)) > > > > /* > > diff --git a/include/vdso/page.h b/include/vdso/page.h > > index bc47186c07fc..948b13091084 100644 > > --- a/include/vdso/page.h > > +++ b/include/vdso/page.h > > @@ -28,4 +28,6 @@ > > #define PAGE_MASK (~(PAGE_SIZE - 1)) > > #endif > > > > +#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) > > + > > #endif /* __VDSO_PAGE_H */