public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] uapi: Refactor __GENMASK() and __GENMASK_ULL() for
@ 2025-02-11 16:24 I Hsin Cheng
  2025-02-11 16:24 ` [PATCH 1/2] uapi: Refactor __GENMASK() for speed-up I Hsin Cheng
  2025-02-11 16:24 ` [PATCH 2/2] uapi: Refactor __GENMASK_ULL() " I Hsin Cheng
  0 siblings, 2 replies; 14+ messages in thread
From: I Hsin Cheng @ 2025-02-11 16:24 UTC (permalink / raw)
  To: yury.norov
  Cc: anshuman.khandual, arnd, linux-kernel, jserv, skhan, I Hsin Cheng

This patch series refactor the implementation of the macros
__GENMASK() and __GENMASK_ULL() in order to speed up the operation by
reducing the number of instructions.

All the changes pass the unit tests and have used bloat-o-meter to test
the size shrink for vmlinux. Performance tests comparison are list in
each patches.

$ ./scripts/bloat-o-meter vmlinux_old vmlinux_new 
add/remove: 0/2 grow/shrink: 46/510 up/down: 464/-1733 (-1269)
...
Total: Before=22438085, After=22436816, chg -0.01%

Patch 1:
	Refactor __GENMASK()
Patch 2:
	Refactor __GENMASK_ULL()

I Hsin Cheng (2):
  uapi: Refactor __GENMASK() for speed-up
  uapi: Refactor __GENMASK_ULL() for speed-up

 include/uapi/linux/bits.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-02-14 15:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11 16:24 [PATCH 0/2] uapi: Refactor __GENMASK() and __GENMASK_ULL() for I Hsin Cheng
2025-02-11 16:24 ` [PATCH 1/2] uapi: Refactor __GENMASK() for speed-up I Hsin Cheng
2025-02-11 18:39   ` Yury Norov
2025-02-11 18:44     ` Yury Norov
2025-02-12 14:01       ` I Hsin Cheng
2025-02-13 19:54         ` Yury Norov
2025-02-14 14:51           ` I Hsin Cheng
2025-02-14 15:55             ` Yury Norov
2025-02-12 13:50     ` I Hsin Cheng
2025-02-11 16:24 ` [PATCH 2/2] uapi: Refactor __GENMASK_ULL() " I Hsin Cheng
2025-02-11 22:30   ` David Laight
2025-02-12 12:39     ` I Hsin Cheng
2025-02-12 13:52       ` David Laight
2025-02-12 14:12       ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox