From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by dpdk.org (Postfix) with ESMTP id E98BB9DE for ; Fri, 6 Dec 2013 23:22:22 +0100 (CET) Received: by mail-we0-f181.google.com with SMTP id x55so1311828wes.12 for ; Fri, 06 Dec 2013 14:23:26 -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:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=jJCmyLTSjQf4iG5O1mLLey9h0JVfdzvbiyHyFC5yTSI=; b=JZEJIuEqktzrHtTx1dTE+zJC3P5l4gfm2UyKtNoxv1UGh5thiFTxDv9G/9NqORWjNU xM80jWpPtGQbgrjjQko23wLAp1zMu2NPvzbjVdQba4G2/jujhm7uuzcaWeK2m3rrWMVO 4w6mD9Q+Ft0qz41bCCapeEzspztpdeb1mmxdck8zNAXHXVcUDWOyaaP7f0u5HqY8clN2 8JH4ZQjhHkibxLLQ3SCqCa498k4nXd/3AuldxUKGtytPGZMmIvMfrnYL8oSYEixq60J5 4c64tHI8jaFvHWiMFsxzlU+/+7rsea44M7X+peXQ33MnOOHYXZVhLCGoxmVKKJaPTjO4 J5NA== X-Gm-Message-State: ALoCoQnQ5Gr8DvYqhaJLqC8PW6jeYFZKTeXudN77CYzPMC01Bj9EaJafKQMnhmQN22qmzuRBKbY+ X-Received: by 10.194.89.233 with SMTP id br9mr5276165wjb.15.1386368605909; Fri, 06 Dec 2013 14:23:25 -0800 (PST) Received: from x220.localnet (abo-107-62-68.mts.modulonet.fr. [85.68.62.107]) by mx.google.com with ESMTPSA id fj8sm8870038wib.1.2013.12.06.14.23.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Dec 2013 14:23:22 -0800 (PST) From: Thomas Monjalon To: Pashupati Kumar Date: Fri, 06 Dec 2013 23:24:27 +0100 Message-ID: <4656219.tgqzelRNOJ@x220> Organization: 6WIND User-Agent: KMail/4.11.3 (Linux/3.12.2-1-ARCH; KDE/4.11.4; x86_64; ; ) In-Reply-To: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E7A@HQ1-EXCH02.corp.brocade.com> References: <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E6B@HQ1-EXCH02.corp.brocade.com> <6733914.61HpXdIraN@x220> <6895EAE0CA8DEE40B92D7CA88BB521F332BA572E7A@HQ1-EXCH02.corp.brocade.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:22:23 -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. 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 :) PS: please try to answer below the question. It's far easier to read. -- Thomas