From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: Bit spinlocks in DPDK Date: Thu, 19 Dec 2013 17:41:08 +0100 Message-ID: <201312191741.08477.thomas.monjalon@6wind.com> References: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E6B@HQ1-EXCH02.corp.brocade.com> <4656219.tgqzelRNOJ@x220> <01d001cef375$7167e300$5437a900$@com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: "=?iso-8859-1?q?Fran=E7ois-Fr=E9d=E9ric?= Ozog" Return-path: In-Reply-To: <01d001cef375$7167e300$5437a900$@com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 07/12/2013 18:54, Fran=E7ois-Fr=E9d=E9ric 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. > >=20 > > Oh yes, like test_and_set_bit_lock() in Linux: > > http://lxr.free-electrons.com/source/arch/ia64/include/asm/bitops.h?v= =3D3.12#L205 > >=20 > > I think that a patch would be appreciated :) >=20 > 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 =2D-=20 Thomas