From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7050FE67A8A for ; Wed, 4 Mar 2026 12:48:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7990D10E176; Wed, 4 Mar 2026 12:48:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.b="U5NhpZCn"; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34A5E10E176; Wed, 4 Mar 2026 12:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=YsXg2qDZ+ZjnQnj/eNfiIgU3SLUyimkRR7bx5y5oB4w=; b=U5NhpZCn934XojSyVFL1nj1S/W 2SwNvFKnKgDXQSzq6m51IMvSlZX+ne4bEh4E01vZtYgpLee5ixUDi8qEHb4R97fy2f4d2ReNAtXFl 2Myy/FM9yjpIi4F5MCjGcXNEoyN2WDgyc7039UPkredIXwYhk1etVNasHnwai+IB6c4ro8VQTd24m dlAjACdWYLWNFfSy+VdBxKivYhNczBRSHxMPHao0CvqQusPNjCznq/i4rksmb+FqExqEhxu3s5ruZ HIicL8wW2i2h8YBWX0vQS1a34HK9wPAQFs79TabY9VaeD6tSKbvzAdMAvOXPYXBWy7iVhi1jbb7PJ KVa5pNSQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vxle2-00000004Z41-2FWR; Wed, 04 Mar 2026 12:48:06 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 07040300666; Wed, 04 Mar 2026 13:48:06 +0100 (CET) Date: Wed, 4 Mar 2026 13:48:05 +0100 From: Peter Zijlstra To: Sean Christopherson Cc: Jens Axboe , Jakub Kicinski , Yury Norov , Andrew Morton , "David S. Miller" , "Michael S. Tsirkin" , Theodore Ts'o , Albert Ou , Alexander Duyck , Alexander Gordeev , Alexander Viro , Alexandra Winter , Andreas Dilger , Andrew Lunn , Anna Schumaker , Anton Yakovlev , Arnaldo Carvalho de Melo , Aswin Karuvally , Borislav Petkov , Carlos Maiolino , Catalin Marinas , Chao Yu , Christian Borntraeger , Christian Brauner , Claudio Imbrenda , Dave Hansen , David Airlie , Dominique Martinet , Dongsheng Yang , Eric Dumazet , Eric Van Hensbergen , Heiko Carstens , Herbert Xu , Ingo Molnar , Jaegeuk Kim , Jani Nikula , Janosch Frank , Jaroslav Kysela , Joonas Lahtinen , Latchesar Ionkov , Linus Walleij , Madhavan Srinivasan , Mark Brown , Michael Ellerman , Miklos Szeredi , Namhyung Kim , Palmer Dabbelt , Paolo Abeni , Paolo Bonzini , Paul Walmsley , Rodrigo Vivi , Simona Vetter , Takashi Iwai , Thomas Gleixner , Trond Myklebust , Tvrtko Ursulin , Vasily Gorbik , Will Deacon , Yury Norov , Zheng Gu , linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-block@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, dm-devel@lists.linux.dev, netdev@vger.kernel.org, linux-spi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-crypto@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, v9fs@lists.linux.dev, virtualization@lists.linux.dev, linux-sound@vger.kernel.org Subject: Re: [PATCH 0/8] mm: globalize rest_of_page() macro Message-ID: <20260304124805.GB2277644@noisy.programming.kicks-ass.net> References: <20260304012717.201797-1-ynorov@nvidia.com> <20260303182845.250bb2de@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Mar 03, 2026 at 06:49:36PM -0800, Sean Christopherson wrote: > On Tue, Mar 03, 2026, Jens Axboe wrote: > > On 3/3/26 7:28 PM, Jakub Kicinski wrote: > > > On Tue, 3 Mar 2026 20:27:08 -0500 Yury Norov wrote: > > >> The net/9p networking driver has a handy macro to calculate the > > >> amount of bytes from a given pointer to the end of page. Move it > > >> to core/mm, and apply tree-wide. No functional changes intended. > > >> > > >> This series was originally introduced as a single patch #07/12 in: > > >> > > >> https://lore.kernel.org/all/20260219181407.290201-1-ynorov@nvidia.com/ > > >> > > >> Split it for better granularity and submit separately. > > > > > > I don't get what the motivation is here. Another helper developers > > > and readers of the code will need to know about just to replace > > > obvious and easy to comprehend math. > > > > I fully agree, I had the same thought reading this. > > +1 from KVM-land. Right, this. I hate these pointless helpers that obscure perfectly sensible and obvious code -- and for me that includes things like rounddown() and DIV_ROUND_UP(). It just makes the code harder to read.