Re: [PATCH] 2.5.21 Nonlinear CPU support

From: Rusty Russell (
Date: Wed Jun 12 2002 - 03:06:47 EST

In message <> you write:
> >Now, you *could* only allocate buffers for cpus where cpu_possible(i)
> >is true, once the rest of the patch goes in. That would be a valid
> >optimization.
> Please explain. What is cpu_possible()?

>From Hotcpu/hotcpu-boot-i386.patch.gz:

--- working-2.5.19-pre-hotcpu/include/asm-i386/smp.h Tue Jun 4 15:37:09 2002
+++ working-2.5.19-hotcpu/include/asm-i386/smp.h Mon Jun 3 18:00:09 2002
@@ -93,6 +94,8 @@
 #define smp_processor_id() (current_thread_info()->cpu)
 #define cpu_online(cpu) (cpu_online_map & (1<<(cpu)))
+#define cpu_possible(cpu) (phys_cpu_present_map & (1<<(cpu)))
 extern inline unsigned int num_online_cpus(void)

ie. "Can this CPU number *ever* exist?", for exactly this kind of
optimization. It looks like it was a mistake to leave that to a later
patch, but I didn't appreciate the 64k-per-cpu buffer for NTFS (what
is it for, by the way? per-cpu buffering for a filesystem seems, um,


  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
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

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:24 EST