From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-000f0801.pphosted.com (mx0b-000f0801.pphosted.com [67.231.152.113]) by dpdk.org (Postfix) with ESMTP id 655FD9DE for ; Fri, 6 Dec 2013 23:53:28 +0100 (CET) Received: from pps.filterd (m0000700 [127.0.0.1]) by mx0b-000f0801.pphosted.com (8.14.5/8.14.5) with SMTP id rB6MkswD031146; Fri, 6 Dec 2013 14:54:29 -0800 Received: from hq1wp-exchub01.corp.brocade.com ([144.49.131.13]) by mx0b-000f0801.pphosted.com with ESMTP id 1gkn0604r3-12 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 06 Dec 2013 14:54:29 -0800 Received: from HQ1WP-EXHUB02.corp.brocade.com (10.70.38.14) by HQ1WP-EXCHUB01.corp.brocade.com (10.70.36.99) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 6 Dec 2013 14:54:28 -0800 Received: from HQ1-EXCH02.corp.brocade.com ([fe80::c92a:772e:befa:c34c]) by HQ1WP-EXHUB02.corp.brocade.com ([fe80::e1f4:a4c8:696b:3780%10]) with mapi; Fri, 6 Dec 2013 14:54:23 -0800 From: Pashupati Kumar To: Thomas Monjalon Date: Fri, 6 Dec 2013 14:54:22 -0800 Thread-Topic: [dpdk-dev] Bit spinlocks in DPDK Thread-Index: Ac7y0cn2A+U4BnknRuuOdfI4fBkuAwAA6tOA Message-ID: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E81@HQ1-EXCH02.corp.brocade.com> References: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E6B@HQ1-EXCH02.corp.brocade.com> <6733914.61HpXdIraN@x220> <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E7A@HQ1-EXCH02.corp.brocade.com> <4656219.tgqzelRNOJ@x220> In-Reply-To: <4656219.tgqzelRNOJ@x220> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.72, 1.0.14, 0.0.0000 definitions=2013-12-06_06:2013-12-06,2013-12-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1312060163 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: Fri, 06 Dec 2013 22:53:28 -0000 > 06/12/2013 14:12, Pashupati Kumar : > > From: Thomas Monjalon > > > 06/12/2013 13:04, Pashupati Kumar : > > > > We use bit spinlocks extensively to have compact data structures. > > > > Are there any plans for adding them to DPDK in some future release? > > > > > > Not sure to understand your request. > > > Are you looking for that? > > > http://dpdk.org/doc/api/rte__spinlock_8h.html > > > > 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 > PS: please try to answer below the question. It's far easier to read. > -- > Thomas Yes. Thank you. Pash