[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250923153146.365015-1-fam.zheng@bytedance.com>
Date: Tue, 23 Sep 2025 15:31:41 +0000
From: Fam Zheng <fam.zheng@...edance.com>
To: linux-kernel@...r.kernel.org
Cc: Lukasz Luba <lukasz.luba@....com>,
linyongting@...edance.com,
songmuchun@...edance.com,
satish.kumar@...edance.com,
Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
yuanzhu@...edance.com,
Ingo Molnar <mingo@...hat.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
fam.zheng@...edance.com,
Zhang Rui <rui.zhang@...el.com>,
fam@...hon.net,
"H. Peter Anvin" <hpa@...or.com>,
x86@...nel.org,
liangma@...edance.com,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
guojinhui.liam@...edance.com,
linux-pm@...r.kernel.org,
Thom Hughes <thom.hughes@...edance.com>
Subject: [RFC 0/5] parker: PARtitioned KERnel
From: Thom Hughes <thom.hughes@...edance.com>
Hi all,
Parker is a proposed feature in linux for multiple linux kernels to run
simultaneously on single machine, without traditional kvm virtualisation. This
is achieved by partitioning the CPU cores, memory and devices for
partitioning-aware Linux kernel.
=== Side note begin ===
Coincidentally it has some similarities with [1] but the design and
implementations are totally separate.
While there are still many open questions and pending work in this direction, we
hope to share the idea and collect feedbacks from you!
=== Side note end ===
Each kernel instance can have the same image, but the initial kernel, or Boot
Kernel, controls the hardware allocation and partition. All other kernels are
secondary kernel, or Application Kernel, touch their own assigned CPU/Memory/IO
devices.
The primary use case in mind for parker is on the machines with high core
counts, where scalability concerns may arise. Once started, there is no
communication between kernel instances. In other words, they share nothing thus
improve scalability. Each kernel needs its own (PCIe) devices for IO, such as
NVMe or NICs.
Another possible use case is for different kernel instances to have different
performance tunings, CONFIG_ options, FDO/PGO according to the workload.
On the implementation side, parker exposes a kernfs directory interface, and
uses kexec to hot-load secondary kernel images to reserved memory regions.
Before creating partitions, the Boot Kernel will offline cpus, reserve physical
memory (using CMA), unbind PCI devices, etc. allocating those to the Application
Kernel so that it can safely use it.
In terms of fault isolation or security, all kernel instances share the same
domain, as there is no supervising mechanism. A kernel bug in any partition can
cause problems for the whole physical machine. This is a tradeoff for
low-overhead / low-complexity, but hope in the future we can take advantage of
some hardware mechanism to introduce some isolation.
Signed-off-by: Thom Hughes <thom.hughes@...edance.com>
Signed-off-by: Fam Zheng <fam.zheng@...edance.com>
[1] https://lore.kernel.org/lkml/20250918222607.186488-1-xiyou.wangcong@gmail.com/
Thom Hughes (5):
x86/boot/e820: Fix memmap to parse with 1 argument
x86/smpboot: Export wakeup_secondary_cpu_via_init
x86/parker: Introduce parker kerfs interface
x86/parker: Add parker initialisation code
x86/apic: Make Parker instance use physical APIC
arch/x86/Kbuild | 3 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/smp.h | 1 +
arch/x86/kernel/apic/apic_flat_64.c | 3 +-
arch/x86/kernel/e820.c | 2 +-
arch/x86/kernel/setup.c | 4 +
arch/x86/kernel/smpboot.c | 2 +-
arch/x86/parker/Kconfig | 4 +
arch/x86/parker/Makefile | 3 +
arch/x86/parker/Makefile-full | 3 +
arch/x86/parker/internal.h | 54 ++
arch/x86/parker/kernfs.c | 1266 +++++++++++++++++++++++++++
arch/x86/parker/setup.c | 423 +++++++++
arch/x86/parker/trampoline.S | 55 ++
arch/x86/parker/trampoline.h | 10 +
drivers/thermal/intel/therm_throt.c | 3 +
include/linux/parker-bkup.h | 22 +
include/linux/parker.h | 22 +
include/uapi/linux/magic.h | 1 +
19 files changed, 1880 insertions(+), 3 deletions(-)
create mode 100644 arch/x86/parker/Kconfig
create mode 100644 arch/x86/parker/Makefile
create mode 100644 arch/x86/parker/Makefile-full
create mode 100644 arch/x86/parker/internal.h
create mode 100644 arch/x86/parker/kernfs.c
create mode 100644 arch/x86/parker/setup.c
create mode 100644 arch/x86/parker/trampoline.S
create mode 100644 arch/x86/parker/trampoline.h
create mode 100644 include/linux/parker-bkup.h
create mode 100644 include/linux/parker.h
--
2.39.5
Powered by blists - more mailing lists