lkml.org 
[lkml]   [2005]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: hashed spinlocks
From
Date
On Sun, 2005-07-31 at 11:46 -0700, David S. Miller wrote:
> From: Daniel Walker <dwalker@mvista.com>
> Date: Sun, 31 Jul 2005 09:27:55 -0700
>
> > >From 2.6.13-rc4 this hunk
> >
> > +#else
> > +# define rt_hash_lock_addr(slot) NULL
> > +# define rt_hash_lock_init()
> > +#endif
> >
> > Doesn't work with the following,
> >
> > + spin_unlock(rt_hash_lock_addr(i));
> >
> >
> > Cause your spin locking a NULL .. I would give a patch, but I'm not sure
> > what should be done in this case..
>
> That spinlock debugging code is such a pain in the butt,
> nothing at all should be happening with spinlocks on
> a non-SMP build.
>
> We should just change the route.c ifdef to check for
> CONFIG_DEBUG_SPINLOCK as well as CONFIG_SMP, in order
> to fix this.

The ifdef that switched between the two rt_hash_lock_addr() switched on
for CONFIG_SMP or CONFIG_DEBUG_SPINLOCK . I was compiling UP , so I
didn't get either.

Seems like you'll need to have an rt_hash_lock(slot) that replaces the
spin_lock calls ..

Daniel


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

\
 
 \ /
  Last update: 2005-07-31 21:11    [W:0.049 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site