From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 3CB0A1E5B68; Wed, 4 Mar 2026 12:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772628492; cv=none; b=T7JMNVU4O0qVbH+hZ9kFF873vfg8YZHC4ZBEWq2YPicKQaZk0MYgQI1Xu9yCJZ7zCZOeEGN3McuAhahB0GJAZZeVlgD4Jj6eLOmdMH26fbP9oytkinlRcacgCm/9JCq+b13GJQjwrplm80iMsoli8ySrDEy3HHqTXMb0hY9SYgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772628492; c=relaxed/simple; bh=ZqxKumdP+DNsxXXslcjyg5g3aU/VfpjJU2mvzXFg4hE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dy1SJW5kA264gHFLvdfEHrvMBsl4yppJR340k91AqnYcVap1dAXWhIak3rsYMddSlzDUlzdjHUKDt14MzyMWl2c1p8kyFSgZjnr41TdafcLhb+dJL9a3MHPgoUnqPjKaB8EdGKMbnUREn8kMH2aJr1CMLZvQ/zCztAIVI4/mbeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=U5NhpZCn; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none 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="U5NhpZCn" 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> Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.