public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
@ 2008-05-05 13:52 Vaidyanathan Srinivasan
  2008-05-05 20:25 ` Mike Travis
  2008-05-06 12:04 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Vaidyanathan Srinivasan @ 2008-05-05 13:52 UTC (permalink / raw)
  To: Linux Kernel, tglx, Ingo Molnar, Mike Travis; +Cc: Arjan van de Ven

Hi,

System topology on intel based system needs to be exported 
for non-numa case as well.

All parts of asm-i386/topology.h has come under 
#ifdef CONFIG_NUMA after the merge to asm-x86/topology.h

/sys/devices/system/cpu/cpu?/topology/* is populated based on 
ENABLE_TOPO_DEFINES

The sysfs cpu topology is not being populated on my dual socket
dual core xeon 5160 processor based (x86 32 bit) system.

CONFIG_NUMA is not set in my case yet the topology is relevant
and useful.

irqbalance daemon application depends on topology to build the
cpus and package list and it fails on Fedora9 beta since the 
sysfs topology was not being populated in the 2.6.25 kernel.

I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES
for non-numa systems.

This fix has been tested on the above mentioned dual core, dual socket
system.

Comments? Did I miss already posted fix?

--Vaidy

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>

---
 include/asm-x86/topology.h |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--- linux-2.6.25.1.orig/include/asm-x86/topology.h
+++ linux-2.6.25.1/include/asm-x86/topology.h
@@ -25,6 +25,16 @@
 #ifndef _ASM_X86_TOPOLOGY_H
 #define _ASM_X86_TOPOLOGY_H
 
+#ifdef CONFIG_X86_32
+# ifdef CONFIG_X86_HT
+#  define ENABLE_TOPO_DEFINES
+# endif
+#else
+# ifdef CONFIG_SMP
+#  define ENABLE_TOPO_DEFINES
+# endif
+#endif
+
 #ifdef CONFIG_NUMA
 #include <linux/cpumask.h>
 #include <asm/mpspec.h>
@@ -112,10 +122,6 @@ extern unsigned long node_end_pfn[];
 extern unsigned long node_remap_size[];
 #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid])
 
-# ifdef CONFIG_X86_HT
-#  define ENABLE_TOPO_DEFINES
-# endif
-
 # define SD_CACHE_NICE_TRIES	1
 # define SD_IDLE_IDX		1
 # define SD_NEWIDLE_IDX		2
@@ -123,10 +129,6 @@ extern unsigned long node_remap_size[];
 
 #else
 
-# ifdef CONFIG_SMP
-#  define ENABLE_TOPO_DEFINES
-# endif
-
 # define SD_CACHE_NICE_TRIES	2
 # define SD_IDLE_IDX		2
 # define SD_NEWIDLE_IDX		0

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

* Re: [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
  2008-05-05 13:52 [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) Vaidyanathan Srinivasan
@ 2008-05-05 20:25 ` Mike Travis
  2008-05-06 12:04 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Travis @ 2008-05-05 20:25 UTC (permalink / raw)
  To: Linux Kernel, tglx, Ingo Molnar, Mike Travis, Arjan van de Ven

Hi,

I've tried this patch on an x86_64 system and it seems to be ok.
One thing I've noticed is that turning on ENABLE_TOPO_DEFINES
will turn on "arch_provides_topology_pointers".  This indicates
that the support functions can provide a pointer to various
topology related cpu masks.  I haven't checked the i386 arch
code yet to determine if this is in fact true (or if the arch
wants it to be true.  It is a low impact area used for showing
the cpu core and thread siblings.)

Thanks,
Mike

Vaidyanathan Srinivasan wrote:
> Hi,
> 
> System topology on intel based system needs to be exported 
> for non-numa case as well.
> 
> All parts of asm-i386/topology.h has come under 
> #ifdef CONFIG_NUMA after the merge to asm-x86/topology.h
> 
> /sys/devices/system/cpu/cpu?/topology/* is populated based on 
> ENABLE_TOPO_DEFINES
> 
> The sysfs cpu topology is not being populated on my dual socket
> dual core xeon 5160 processor based (x86 32 bit) system.
> 
> CONFIG_NUMA is not set in my case yet the topology is relevant
> and useful.
> 
> irqbalance daemon application depends on topology to build the
> cpus and package list and it fails on Fedora9 beta since the 
> sysfs topology was not being populated in the 2.6.25 kernel.
> 
> I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES
> for non-numa systems.
> 
> This fix has been tested on the above mentioned dual core, dual socket
> system.
> 
> Comments? Did I miss already posted fix?
> 
> --Vaidy
> 
> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> 
> ---
>  include/asm-x86/topology.h |   18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> --- linux-2.6.25.1.orig/include/asm-x86/topology.h
> +++ linux-2.6.25.1/include/asm-x86/topology.h
> @@ -25,6 +25,16 @@
>  #ifndef _ASM_X86_TOPOLOGY_H
>  #define _ASM_X86_TOPOLOGY_H
>  
> +#ifdef CONFIG_X86_32
> +# ifdef CONFIG_X86_HT
> +#  define ENABLE_TOPO_DEFINES
> +# endif
> +#else
> +# ifdef CONFIG_SMP
> +#  define ENABLE_TOPO_DEFINES
> +# endif
> +#endif
> +
>  #ifdef CONFIG_NUMA
>  #include <linux/cpumask.h>
>  #include <asm/mpspec.h>
> @@ -112,10 +122,6 @@ extern unsigned long node_end_pfn[];
>  extern unsigned long node_remap_size[];
>  #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid])
>  
> -# ifdef CONFIG_X86_HT
> -#  define ENABLE_TOPO_DEFINES
> -# endif
> -
>  # define SD_CACHE_NICE_TRIES	1
>  # define SD_IDLE_IDX		1
>  # define SD_NEWIDLE_IDX		2
> @@ -123,10 +129,6 @@ extern unsigned long node_remap_size[];
>  
>  #else
>  
> -# ifdef CONFIG_SMP
> -#  define ENABLE_TOPO_DEFINES
> -# endif
> -
>  # define SD_CACHE_NICE_TRIES	2
>  # define SD_IDLE_IDX		2
>  # define SD_NEWIDLE_IDX		0


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

* Re: [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
  2008-05-05 13:52 [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) Vaidyanathan Srinivasan
  2008-05-05 20:25 ` Mike Travis
@ 2008-05-06 12:04 ` Ingo Molnar
  2008-05-15 17:58   ` Vaidyanathan Srinivasan
  1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2008-05-06 12:04 UTC (permalink / raw)
  To: Linux Kernel, tglx, Mike Travis, Arjan van de Ven, H. Peter Anvin,
	Vaidyanathan Srinivasan


* Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:

> System topology on intel based system needs to be exported for 
> non-numa case as well.
> 
> All parts of asm-i386/topology.h has come under 
> #ifdef CONFIG_NUMA after the merge to asm-x86/topology.h
> 
> /sys/devices/system/cpu/cpu?/topology/* is populated based on 
> ENABLE_TOPO_DEFINES
> 
> The sysfs cpu topology is not being populated on my dual socket
> dual core xeon 5160 processor based (x86 32 bit) system.
> 
> CONFIG_NUMA is not set in my case yet the topology is relevant
> and useful.
> 
> irqbalance daemon application depends on topology to build the cpus 
> and package list and it fails on Fedora9 beta since the sysfs topology 
> was not being populated in the 2.6.25 kernel.
> 
> I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES 
> for non-numa systems.
> 
> This fix has been tested on the above mentioned dual core, dual socket
> system.

applied, thanks Vaidyanathan.

This was certainly not intentional - i suspect nobody noticed that 
irqbalanced was working without proper topology information?

	Ingo

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

* Re: [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
  2008-05-06 12:04 ` Ingo Molnar
@ 2008-05-15 17:58   ` Vaidyanathan Srinivasan
  0 siblings, 0 replies; 4+ messages in thread
From: Vaidyanathan Srinivasan @ 2008-05-15 17:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linux Kernel, tglx, Mike Travis, Arjan van de Ven, H. Peter Anvin

* Ingo Molnar <mingo@elte.hu> [2008-05-06 14:04:36]:

> 
> * Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:
> 
> > System topology on intel based system needs to be exported for 
> > non-numa case as well.
> > 
> > All parts of asm-i386/topology.h has come under 
> > #ifdef CONFIG_NUMA after the merge to asm-x86/topology.h
> > 
> > /sys/devices/system/cpu/cpu?/topology/* is populated based on 
> > ENABLE_TOPO_DEFINES
> > 
> > The sysfs cpu topology is not being populated on my dual socket
> > dual core xeon 5160 processor based (x86 32 bit) system.
> > 
> > CONFIG_NUMA is not set in my case yet the topology is relevant
> > and useful.
> > 
> > irqbalance daemon application depends on topology to build the cpus 
> > and package list and it fails on Fedora9 beta since the sysfs topology 
> > was not being populated in the 2.6.25 kernel.
> > 
> > I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES 
> > for non-numa systems.
> > 
> > This fix has been tested on the above mentioned dual core, dual socket
> > system.
> 
> applied, thanks Vaidyanathan.
> 
> This was certainly not intentional - i suspect nobody noticed that 
> irqbalanced was working without proper topology information?

Hi Ingo,

Thank you for pushing the patch to 2.6.25-rc2.  I have tested
2.6.26-rc2  for correct topology information and parsing by irqbalance
daemon in the following system configurations:

32-bit Two socket dual core xeon 5160 processor system
32-bit Two socket quad core xeon E5450 processor system

--Vaidy


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

end of thread, other threads:[~2008-05-15 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 13:52 [BUG] sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) Vaidyanathan Srinivasan
2008-05-05 20:25 ` Mike Travis
2008-05-06 12:04 ` Ingo Molnar
2008-05-15 17:58   ` Vaidyanathan Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox