netdev
[Top] [All Lists]

Re: [patch] Convert sockets_in_use to use per_cpu areas

To: kiran@xxxxxxxxxx
Subject: Re: [patch] Convert sockets_in_use to use per_cpu areas
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 23 Dec 2002 12:16:32 -0800 (PST)
Cc: netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20021223190847.G23413@xxxxxxxxxx>
References: <20021223190847.G23413@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
   From: Ravikiran G Thirumalai <kiran@xxxxxxxxxx>
   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.


<Prev in Thread] Current Thread [Next in Thread>