lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqUvgRJZQUmyHpna@casper.infradead.org>
Date: Sat, 27 Jul 2024 18:33:53 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Linus Torvalds <torvalds@...uxfoundation.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Jens Axboe <axboe@...nel.dk>,
	David Laight <David.Laight@...lab.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Christoph Hellwig <hch@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	Arnd Bergmann <arnd@...nel.org>,
	"Jason@...c4.com" <Jason@...c4.com>,
	"pedro.falcato@...il.com" <pedro.falcato@...il.com>,
	Mateusz Guzik <mjguzik@...il.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 0/7] minmax: reduce compilation time

On Fri, Jul 26, 2024 at 09:13:11PM -0700, Linus Torvalds wrote:
> but while that is certainly an impressive 82kB line, we have some good
> company in code VM header files, and I've also seen
> 
>   Longest line is include/linux/page-flags.h:507 (27kB)
>      'static inline __attribute__((__gnu_inline__))
> __attribute__((__unused__)) __attribute__((no_instrume...'
> 
> because the expansion from
> 
>     __PAGEFLAG(Locked, locked, PF_NO_TAIL)
> 
> does indeed generate some impressive stuff. It's all the functions for
> the locked bit handling generated from one line.

In the specific case of PageLocked, that can hopefully go away fairly
soon.  We only have 24 instances left in tree and five of those are
comments/docs.  The ones in fs (btrfs, crypto, f2fs, ocfs2 and pipe)
should be converted to folio soon.

Mostly they're just detritus.  We could probably remove the PageLocked
definition in the next merge window if we actually care.


But I have been wondering whether the way we define all the functions
around page/folio flags is sensible.  Every file which includes
page-flags.h (... which is most of them ...) regenerates the macros.
You can't grep for the definition of folio_test_locked().  There's
nowhere to put kernel-doc for folio_test_locked().

Would we be better off generating page-flags-generated.h from a more
compact definition file somewhere, rather than using the C preprocessor?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ