From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by dpdk.org (Postfix) with ESMTP id 50DFA5906 for ; Thu, 19 Dec 2013 17:40:05 +0100 (CET) Received: by mail-we0-f182.google.com with SMTP id q59so1349063wes.27 for ; Thu, 19 Dec 2013 08:41:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=N9oDlHFKV+NTyklOSXWKnBd1g8uJ8vEa7QXF2RVX7oc=; b=hxl1KcGrjPIii8UKbDR3PKbYS7HKWlX/t7ArglZZnq9+X0gLcAkL11cQm4hJXEsQo7 t4GWRylgB6OxFYdhJ3BQn4l6d6lZXJosR98hAwbCGlA+e80yVDzmqw1WDQwKMpKgEsf6 9yuDBxWjcRH0K3bSJkLYM9Ww9kmvXBdsBNtf4gf7BF244IqFgDwJ6AB8UmVq7iYkzrM2 3/tsKStP2eY/qtBOtZToVUFTi2ySwQ1AfjBvbEcjZhZCHbpsKF4YBuEBVTKCOnx9vu/d P3159WDkrLp2fhAXjIcVYOjguMF/OCxGXDBpoqDap3shzsnybGLImTlEqtMhBLnm4vDf oqig== X-Gm-Message-State: ALoCoQnCEOV0ntXFt62jqFRWejEI/KpBG7VNhg8jgzn1eRQyDYtxlDQ4LrwhchGMfksmsPIZoqok X-Received: by 10.180.85.202 with SMTP id j10mr3527330wiz.35.1387471271899; Thu, 19 Dec 2013 08:41:11 -0800 (PST) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id p10sm381481wje.12.2013.12.19.08.41.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2013 08:41:10 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: "=?iso-8859-1?q?Fran=E7ois-Fr=E9d=E9ric?= Ozog" Date: Thu, 19 Dec 2013 17:41:08 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E6B@HQ1-EXCH02.corp.brocade.com> <4656219.tgqzelRNOJ@x220> <01d001cef375$7167e300$5437a900$@com> In-Reply-To: <01d001cef375$7167e300$5437a900$@com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201312191741.08477.thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Bit spinlocks in DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 16:40:05 -0000 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