Re: topology api confusion

From: Anton Blanchard (anton_at_samba.org)
Date: 08/01/05

  • Next message: David S. Miller: "Re: git-net-fixup.patch added to -mm tree"
    Date:	Mon, 1 Aug 2005 15:07:48 +1000
    To: Nathan Lynch <ntl@pobox.com>
    
    

    Hi,

    > We need some clarity on how asm-generic/topology.h is intended to be
    > used. I suspect that it's supposed to be unconditionally included at
    > the end of the architecture's topology.h so that any elements which
    > are undefined by the arch have sensible default definitions. Looking
    > at 2.6.13-rc3, this is what ppc64, ia64, and x86_64 currently do,
    > however i386 does not (i386 pulls in the generic version only when
    > !CONFIG_NUMA).
    >
    > The #ifndef guards around each element of the topology api
    > cannot serve their apparent intended purpose when the architecture
    > implements a given bit as a function instead of a macro
    > (e.g. cpu_to_node in ppc64):

    Since it doesnt look like this will be resolved by 2.6.13 and NUMA is
    currently completely broken on ppc64, how does this patch look?

    --
    Dont include asm-generic/topology.h unconditionally, we end up
    overriding all the ppc64 specific functions when NUMA is on.
    Signed-off-by: Anton Blanchard <anton@samba.org>
    Index: linux-2.6.git-work/include/asm-ppc64/topology.h
    ===================================================================
    --- linux-2.6.git-work.orig/include/asm-ppc64/topology.h	2005-07-30 23:49:56.000000000 +1000
    +++ linux-2.6.git-work/include/asm-ppc64/topology.h	2005-08-01 14:43:49.000000000 +1000
    @@ -33,6 +33,7 @@
     	return first_cpu(tmp);
     }
     
    +#define pcibus_to_node(node)    (-1)
     #define pcibus_to_cpumask(bus)	(cpu_online_map)
     
     #define nr_cpus_node(node)	(nr_cpus_in_node[node])
    @@ -59,8 +60,10 @@
     	.nr_balance_failed	= 0,			\
     }
     
    -#endif /* CONFIG_NUMA */
    +#else
     
     #include <asm-generic/topology.h>
     
    +#endif /* CONFIG_NUMA */
    +
     #endif /* _ASM_PPC64_TOPOLOGY_H */
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: David S. Miller: "Re: git-net-fixup.patch added to -mm tree"

    Relevant Pages

    • Re: topology api confusion
      ... I suspect that it's supposed to be unconditionally included at ... > overriding all the ppc64 specific functions when NUMA is on. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [OOPS] 2.6.9-rc4, dual Opteron, NUMA, 8GB
      ... It looks like memory corruption somewhere. ... I suspect not directly related to NUMA, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Manfreds patch to distribute boot allocations across nodes
      ... So far we have ppc64 and x86-64. ... I suspect the others will be OK with ... Allocating things round robin avoids a hot node where everything ends up ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: [patch] prefer TSC over PM Timer
      ... and my measurements show it in the same performance ballpark as TSC. ... wouldn't local apic timer be a lot better for NUMA too? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] error path in setup_arg_pages() misses vm_unacct_memory()
      ... leaks 4kB into Committed_AS each time? ... occur on ppc64, each time an ELF binary is run, if vDSO is enabled. ... can we trust callers to maintain total_vm? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)