linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] Introduce & Optimize compat-mode helpers
@ 2023-12-22  7:46 Leonardo Bras
  2023-12-22  7:46 ` [RFC PATCH 1/4] riscv: Replace direct thread flag check with is_compat_task() Leonardo Bras
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Leonardo Bras @ 2023-12-22  7:46 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Eric Biederman,
	Kees Cook, Oleg Nesterov, Leonardo Bras, Conor Dooley, Andy Chiu,
	Greg Ungerer, Vincent Chen, Xiao Wang, Charlie Jenkins,
	Andrew Morton, Alexandre Ghiti, Kemeng Shi, David Hildenbrand,
	Matthew Wilcox (Oracle),
	Qinglin Pan, Greentime Hu, Björn Töpel,
	Clément Léger, Guo Ren
  Cc: linux-riscv, linux-kernel, linux-mm

I just saw the opportunity of optimizing the helper is_compat_task() by
introducing a compile-time test, and it made possible to remove some
#ifdef's without any loss of performance.

I also saw the possibility of removing the direct check of task flags from
general code, and concentrated it in asm/compat.h by creating a few more
helpers, which in the end helped optimize code.

Leonardo Bras (4):
  riscv: Replace direct thread flag check with is_compat_task()
  riscv: add compile-time test into is_compat_task()
  riscv: Introduce is_compat_thread() into compat.h
  riscv: Introduce set_compat_task() in asm/compat.h

 arch/riscv/include/asm/compat.h    | 19 +++++++++++++++++++
 arch/riscv/include/asm/elf.h       | 11 ++---------
 arch/riscv/include/asm/pgtable.h   |  8 +-------
 arch/riscv/include/asm/processor.h |  4 ++--
 arch/riscv/kernel/ptrace.c         |  6 +++---
 5 files changed, 27 insertions(+), 21 deletions(-)


base-commit: 24e0d2e527a39f64caeb2e6be39ad5396fb2da5e
-- 
2.43.0



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

end of thread, other threads:[~2023-12-28  3:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-22  7:46 [RFC PATCH 0/4] Introduce & Optimize compat-mode helpers Leonardo Bras
2023-12-22  7:46 ` [RFC PATCH 1/4] riscv: Replace direct thread flag check with is_compat_task() Leonardo Bras
2023-12-22  7:46 ` [RFC PATCH 2/4] riscv: add compile-time test into is_compat_task() Leonardo Bras
2023-12-22  9:35   ` Guo Ren
2023-12-22 17:12     ` Leonardo Bras
2023-12-23  4:15       ` Andy Chiu
2023-12-22  7:46 ` [RFC PATCH 3/4] riscv: Introduce is_compat_thread() into compat.h Leonardo Bras
2023-12-22 11:20   ` Guo Ren
2023-12-22 17:14     ` Leonardo Bras
2023-12-23  4:25   ` Andy Chiu
     [not found]     ` <CAJ6HWG4Pe0co91-tRpV-gKoVUJkobB=uz8J-pjTvyX=Ed49u_w@mail.gmail.com>
2023-12-28  3:10       ` Andy Chiu
2023-12-22  7:46 ` [RFC PATCH 4/4] riscv: Introduce set_compat_task() in asm/compat.h Leonardo Bras
2023-12-22  8:11   ` Guo Ren
2023-12-22  8:28     ` Leonardo Bras

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