All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Fw: 2.6.15-rc2-mm1 problems (get_cpu / NUMA optimizations)
       [not found] <20051123.155603.64967447.davem@davemloft.net>
@ 2005-11-24 20:58 ` Harald Welte
  2005-11-24 22:11   ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Harald Welte @ 2005-11-24 20:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist, kaber, Eric Dumazet

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

On Wed, Nov 23, 2005 at 03:56:03PM -0800, David S. Miller wrote:
> 
> I've seen this reported multiple times.
> 
> It seems that module load is attempted by IP-tables while
> some locks are held, or similar.

yes, this was introduced by the recent NUMA patches that introduced
get_cpu() / put_cpu() all over the place.  

Seems like I only now realize the implications that this has all over
the code, and to be honest, I'm not confident that there is a short-term
fix since a lot of code needs to be audited.  

Also, apart from just the iptables core,  we actually call the
checkentry() and destroy() functions of the match/target extensions
under get_cpu() now.  Plugin authors always assumed that they'd be able
to do stuff like kmalloc(GFP_KERNEL) since they are guaranteed to always
only be called from userspace context under the ipt_mutex.

I'm further analyzing our options, but we might have to pull out that
NUMA change, especially since I'm heading for FOSS.in/linux-bangalore in
a couple of days.

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: Fw: 2.6.15-rc2-mm1 problems (get_cpu / NUMA optimizations)
  2005-11-24 20:58 ` Fw: 2.6.15-rc2-mm1 problems (get_cpu / NUMA optimizations) Harald Welte
@ 2005-11-24 22:11   ` Eric Dumazet
  2005-11-25  2:18     ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2005-11-24 22:11 UTC (permalink / raw)
  To: Harald Welte; +Cc: Netfilter Development Mailinglist, David S. Miller, kaber

Harald Welte a écrit :
> On Wed, Nov 23, 2005 at 03:56:03PM -0800, David S. Miller wrote:
> 
>>I've seen this reported multiple times.
>>
>>It seems that module load is attempted by IP-tables while
>>some locks are held, or similar.
> 
> 
> yes, this was introduced by the recent NUMA patches that introduced
> get_cpu() / put_cpu() all over the place.  
> 
>

Hum... I was not aware that disabling preemption (in get_cpu()) had this 
effect (ie not allowing to sleep). I was using get_cpu() to bind the thread to 
the current cpu, maybe there is something better ?

If not, we can zap get_cpu()/pu_cpu() and use raw_smp_processor_id() as a hint 
only, (and dont care of preemption/cpu migration), as the value is only used 
as a hint to speedup operations in do_replace(), do_add_counters(), 
ipt_unregister_table(), translate_table()...

Eric

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

* Re: Fw: 2.6.15-rc2-mm1 problems (get_cpu / NUMA optimizations)
  2005-11-24 22:11   ` Eric Dumazet
@ 2005-11-25  2:18     ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2005-11-25  2:18 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Harald Welte, Netfilter Development Mailinglist, David S. Miller

Eric Dumazet wrote:
> Hum... I was not aware that disabling preemption (in get_cpu()) had this 
> effect (ie not allowing to sleep). I was using get_cpu() to bind the 
> thread to the current cpu, maybe there is something better ?

set_cpus_allowed() might work.

> If not, we can zap get_cpu()/pu_cpu() and use raw_smp_processor_id() as 
> a hint only, (and dont care of preemption/cpu migration), as the value 
> is only used as a hint to speedup operations in do_replace(), 
> do_add_counters(), ipt_unregister_table(), translate_table()...

That sounds like a good way. iptables ruleset replacement is and
will always be slow anyway.

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

end of thread, other threads:[~2005-11-25  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20051123.155603.64967447.davem@davemloft.net>
2005-11-24 20:58 ` Fw: 2.6.15-rc2-mm1 problems (get_cpu / NUMA optimizations) Harald Welte
2005-11-24 22:11   ` Eric Dumazet
2005-11-25  2:18     ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.