linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/5] riscv: Introduce compat-mode helpers & improve arch_get_mmap_end()
@ 2024-01-03 16:00 Leonardo Bras
  2024-01-03 16:00 ` [PATCH v1 1/5] riscv: Improve arch_get_mmap_end() macro Leonardo Bras
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Leonardo Bras @ 2024-01-03 16:00 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Eric Biederman,
	Kees Cook, Oleg Nesterov, Leonardo Bras, Guo Ren, Andy Chiu,
	Conor Dooley, Xiao Wang, Vincent Chen, Charlie Jenkins,
	Greg Ungerer, Andrew Morton, Kemeng Shi, Alexandre Ghiti,
	David Hildenbrand, Matthew Wilcox (Oracle), Qinglin Pan,
	Greentime Hu, Baoquan He, Clément Léger
  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.

arch_get_mmap_end() just got a simple improvement and some extra docs.

Changes since RFC:
- Fused with other patchset:  Improve arch_get_mmap_end() macro
- Renamed from "Introduce & Optimize compat-mode helpers"

Leonardo Bras (5):
  riscv: Improve arch_get_mmap_end() macro
  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 | 16 +++++++++++-----
 arch/riscv/kernel/ptrace.c         |  6 +++---
 5 files changed, 36 insertions(+), 24 deletions(-)


base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a
-- 
2.43.0



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

end of thread, other threads:[~2024-03-20 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 16:00 [PATCH v1 0/5] riscv: Introduce compat-mode helpers & improve arch_get_mmap_end() Leonardo Bras
2024-01-03 16:00 ` [PATCH v1 1/5] riscv: Improve arch_get_mmap_end() macro Leonardo Bras
2024-01-03 16:00 ` [PATCH v1 2/5] riscv: Replace direct thread flag check with is_compat_task() Leonardo Bras
2024-01-03 16:00 ` [PATCH v1 3/5] riscv: add compile-time test into is_compat_task() Leonardo Bras
2024-01-03 16:00 ` [PATCH v1 4/5] riscv: Introduce is_compat_thread() into compat.h Leonardo Bras
2024-01-03 16:00 ` [PATCH v1 5/5] riscv: Introduce set_compat_task() in asm/compat.h Leonardo Bras
2024-03-20 20:50 ` [PATCH v1 0/5] riscv: Introduce compat-mode helpers & improve arch_get_mmap_end() patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).