Re: [patch] Convert sockets_in_use to use per_cpu areas

From: David S. Miller (davem@redhat.com)
Date: Mon Dec 23 2002 - 15:16:32 EST


   From: Ravikiran G Thirumalai <kiran@in.ibm.com>
   Date: Mon, 23 Dec 2002 19:08:48 +0530

    
   -static union {
   - int counter;
   - char __pad[SMP_CACHE_BYTES];
   -} sockets_in_use[NR_CPUS] __cacheline_aligned = {{0}};
   +static DEFINE_PER_CPU(int, sockets_in_use);

You have to provide an explicit initializer for DEFINE_PER_CPU
declarations or you break some platforms with older GCC's which
otherwise won't put it into the proper section.

-
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/



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:32 EST