[dpdk-dev] Bit spinlocks in DPDK
Thomas Monjalon
thomas.monjalon at 6wind.com
Thu Dec 19 17:41:08 CET 2013
07/12/2013 18:54, François-Frédéric Ozog :
> > De Thomas Monjalon
> > 06/12/2013 14:12, Pashupati Kumar :
> > > I am looking for spinlocks that use a single bit (bit 31) of a 32 bit
> > > word for locking. The rest of the bits in the word are left
> > > undisturbed. This enables more compact data structures as only 1 bit
> > > is consumed for the lock.
> >
> > Oh yes, like test_and_set_bit_lock() in Linux:
> > http://lxr.free-electrons.com/source/arch/ia64/include/asm/bitops.h?v=3.12#L205
> >
> > I think that a patch would be appreciated :)
>
> I assume you mean the x64 version, not the ia64:
> http://lxr.free-electrons.com/source/arch/x86/include/asm/bitops.h.
Yes you're right.
> What is the policy to share a sample program: inline in a mail or as a
> attachment?
Inline should be fine. It allows to comment.
> What is the policy to submit a patch?
It's now explained here:
http://dpdk.org/dev#send
--
Thomas
More information about the dev
mailing list