From: Tiwei Bie <tiwei.bie@linux.dev>
To: richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net
Cc: linux-um@lists.infradead.org, tiwei.btw@antgroup.com,
tiwei.bie@linux.dev
Subject: [RFC PATCH 1/4] um: Stop tracking virtual CPUs via mm_cpumask()
Date: Mon, 14 Jul 2025 01:25:33 +0800 [thread overview]
Message-ID: <20250713172536.404809-2-tiwei.bie@linux.dev> (raw)
In-Reply-To: <20250713172536.404809-1-tiwei.bie@linux.dev>
From: Tiwei Bie <tiwei.btw@antgroup.com>
In UML, each user address space is represented as a separate stub
process on the host. Therefore, user address spaces do not require
TLB management on UML virtual CPUs, and it's unnecessary to track
which virtual CPUs they have executed on.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/include/asm/mmu_context.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/um/include/asm/mmu_context.h b/arch/um/include/asm/mmu_context.h
index 0bbb24868557..c727e56ba116 100644
--- a/arch/um/include/asm/mmu_context.h
+++ b/arch/um/include/asm/mmu_context.h
@@ -13,20 +13,9 @@
#include <asm/mm_hooks.h>
#include <asm/mmu.h>
-#define activate_mm activate_mm
-static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
-{
-}
-
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
- unsigned cpu = smp_processor_id();
-
- if (prev != next) {
- cpumask_clear_cpu(cpu, mm_cpumask(prev));
- cpumask_set_cpu(cpu, mm_cpumask(next));
- }
}
#define init_new_context init_new_context
--
2.34.1
next prev parent reply other threads:[~2025-07-13 17:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 17:25 [RFC PATCH 0/4] um: Add SMP support Tiwei Bie
2025-07-13 17:25 ` Tiwei Bie [this message]
2025-07-13 17:25 ` [RFC PATCH 2/4] um: Remove unused cpu_data and current_cpu_data macros Tiwei Bie
2025-07-13 17:25 ` [RFC PATCH 3/4] um: vdso: Implement __vdso_getcpu() via syscall Tiwei Bie
2025-07-13 17:25 ` [RFC PATCH 4/4] um: Add SMP support Tiwei Bie
2025-07-14 12:37 ` [RFC PATCH 0/4] " Benjamin Berg
2025-07-14 14:56 ` Tiwei Bie
2025-07-24 21:21 ` Richard Weinberger
2025-07-25 11:42 ` Tiwei Bie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250713172536.404809-2-tiwei.bie@linux.dev \
--to=tiwei.bie@linux.dev \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
--cc=tiwei.btw@antgroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).