lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Nov 2010 12:13:30 +0800
From:	Shaohui Zheng <>
Subject: [v2,5/8] NUMA Hotplug emulator

>This looks like an incredibly painful interface. How about scrapping all
>of this _emu() mess and just reworking the register_cpu() interface?
> Something like:

hi, Paul
	I saw your reply on, but I did not find your email 
in my mailbox, you might forget to cc to me.

	I think that your register_cpu_node interface seems good, but this will 
remove the interface register_cpu. it is not the original purpose of the 
emulator, we want to emulate the oringal process, but we did not want to change
the old interface, that is a rule.

	I want to share some piece of codes, and I did not want to do so much change,
so I call register_cpu and register_cpu_emu in the same function. yes, it is a 
painful interface, I will add a function arch_register_cpu_emu to solve it.

Real hotplug process:
	- call register_cpu

Emulated hotplug process:
	- call register_cpu_emu

diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 7e45159..93859d5 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -52,6 +52,16 @@ int __ref arch_register_cpu(int num)
+/* emulated version for arch_register_cpu */
+int __ref arch_register_cpu_emu(int num, int nid)
+	if (num)
+		per_cpu(cpu_devices, num).cpu.hotpluggable = 1;
+	return register_cpu_emu(&per_cpu(cpu_devices, num).cpu, nid);
 void arch_unregister_cpu(int num)
 	unregister_cpu(&per_cpu(cpu_devices, num).cpu);

Thanks & Regards,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists