DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] add support for HTM lock elision for x86
@ 2015-06-02 13:11 Roman Dementiev
  2015-06-02 13:11 ` [dpdk-dev] [PATCH 1/3] spinlock: " Roman Dementiev
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Roman Dementiev @ 2015-06-02 13:11 UTC (permalink / raw)
  To: dev


This series of patches adds methods that use hardware memory transactions (HTM)
on fast-path for DPDK locks (a.k.a. lock elision). Here the methods are implemented 
for x86 using Restricted Transactional Memory instructions (Intel(r) Transactional 
Synchronization Extensions). The implementation fall-backs to the normal DPDK lock
if HTM is not available or memory transactions fail.
This is not a replacement for lock usages since not all critical sections protected
by locks are friendly to HTM.

Roman Dementiev (3):
 spinlock: add support for HTM lock elision for x86 
 rwlock: add support for HTM lock elision for x86
 test scaling of HTM lock elision protecting rte_hash

 app/test/Makefile                                  |   1 +
 app/test/test_hash_scaling.c                       | 223 +++++++++++++++++++++
 lib/librte_eal/common/Makefile                     |   4 +-
 .../common/include/arch/ppc_64/rte_rwlock.h        |  38 ++++
 .../common/include/arch/ppc_64/rte_spinlock.h      |  41 ++++
 lib/librte_eal/common/include/arch/x86/rte_rtm.h   |  73 +++++++
 .../common/include/arch/x86/rte_rwlock.h           |  82 ++++++++
 .../common/include/arch/x86/rte_spinlock.h         | 107 ++++++++++
 lib/librte_eal/common/include/generic/rte_rwlock.h | 194 ++++++++++++++++++
 .../common/include/generic/rte_spinlock.h          |  75 +++++++
 lib/librte_eal/common/include/rte_rwlock.h         | 158 ---------------
 11 files changed, 836 insertions(+), 160 deletions(-)

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [dpdk-dev] add support for HTM lock elision for x86
@ 2015-06-02 13:17 Dementiev, Roman
  0 siblings, 0 replies; 28+ messages in thread
From: Dementiev, Roman @ 2015-06-02 13:17 UTC (permalink / raw)
  To: dev

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
From rolette@infiniteio.com  Tue Jun  2 15:21:24 2015
Return-Path: <rolette@infiniteio.com>
Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com
 [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id B03FBBDC2
 for <dev@dpdk.org>; Tue,  2 Jun 2015 15:21:24 +0200 (CEST)
Received: by wizo1 with SMTP id o1so144374926wiz.1
 for <dev@dpdk.org>; Tue, 02 Jun 2015 06:21:24 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d\x1e100.net; s 130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:date
 :message-id:subject:from:to:cc:content-type;
 bh=EZ5V09Uf0HqR5pepp3xmM2K+ESwvO6YmUxphj1p/FH4=;
 b=KSmNxWms+vaLWfI43mVrAVKs9hjo5OOHZj8i/fWcPZBQdx7OF1WZqsohu1JQL/p5c2
 4wxywVCESWJefU+OtJ4aluXRwJMbKZaX6KGPS9yNIEkXffuZhxri5VkEzyig3Cz6FzZg
 vMEvsEiVcO3b40xPZ/KtVENZ1AXE48EeeXwvlcpKNzbSittMT2qxJvWqIFtWIhHyZz2G
 LXZ7WdpwSYhyobXxFX/kMMe2n/qDqlAvgo+pIgf0jZdJVBTqz/2Mx8MdJQlCz2BQbzpv
 KyylO/bE46ktW7D8eQVKtBMtykrW1svCYCebSYLEiWD9PA/Mlq+g59HV7uOBjpR0LRag
 JHDw=X-Gm-Message-State: ALoCoQnTMgOKUua0wm5br0wzyd2vyF1dbh6JeCzRCh1zTNb0jX61HFls8jGfZRV8ah0sjrcDwWll
MIME-Version: 1.0
X-Received: by 10.195.18.8 with SMTP id gi8mr11293724wjd.153.1433251284551;
 Tue, 02 Jun 2015 06:21:24 -0700 (PDT)
Received: by 10.194.36.193 with HTTP; Tue, 2 Jun 2015 06:21:24 -0700 (PDT)
In-Reply-To: <1433250693-23644-1-git-send-email-roman.dementiev@intel.com>
References: <1433250693-23644-1-git-send-email-roman.dementiev@intel.com>
Date: Tue, 2 Jun 2015 08:21:24 -0500
Message-ID: <CADNuJVpeKa9-R7WHkoCzw82vpYd=3XmhOoz2JfGsFLzDW+F5UQ@mail.gmail.com>
From: Jay Rolette <rolette@infiniteio.com>
To: Roman Dementiev <roman.dementiev@intel.com>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Cc: DPDK <dev@dpdk.org>
Subject: Re: [dpdk-dev] add support for HTM lock elision for x86
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Jun 2015 13:21:24 -0000

On Tue, Jun 2, 2015 at 8:11 AM, Roman Dementiev <roman.dementiev@intel.com>
wrote:

>
> This series of patches adds methods that use hardware memory transactions
> (HTM)
> on fast-path for DPDK locks (a.k.a. lock elision). Here the methods are
> implemented
> for x86 using Restricted Transactional Memory instructions (Intel(r)
> Transactional
> Synchronization Extensions). The implementation fall-backs to the normal
> DPDK lock
> if HTM is not available or memory transactions fail.
>

This is very interesting. Do you have any summary you can give us of what
the performance implications are from your test data?


> This is not a replacement for lock usages since not all critical sections
> protected
> by locks are friendly to HTM.
>

Any pointers to material that describe where HTM in its current incarnation
on x86 is approprate?


>
> Roman Dementiev (3):
>  spinlock: add support for HTM lock elision for x86
>  rwlock: add support for HTM lock elision for x86
>  test scaling of HTM lock elision protecting rte_hash
>
>  app/test/Makefile                                  |   1 +
>  app/test/test_hash_scaling.c                       | 223
> +++++++++++++++++++++
>  lib/librte_eal/common/Makefile                     |   4 +-
>  .../common/include/arch/ppc_64/rte_rwlock.h        |  38 ++++
>  .../common/include/arch/ppc_64/rte_spinlock.h      |  41 ++++
>  lib/librte_eal/common/include/arch/x86/rte_rtm.h   |  73 +++++++
>  .../common/include/arch/x86/rte_rwlock.h           |  82 ++++++++
>  .../common/include/arch/x86/rte_spinlock.h         | 107 ++++++++++
>  lib/librte_eal/common/include/generic/rte_rwlock.h | 194
> ++++++++++++++++++
>  .../common/include/generic/rte_spinlock.h          |  75 +++++++
>  lib/librte_eal/common/include/rte_rwlock.h         | 158 ---------------
>  11 files changed, 836 insertions(+), 160 deletions(-)
>

Thanks!
Jay

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-06-29 12:20 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 13:11 [dpdk-dev] add support for HTM lock elision for x86 Roman Dementiev
2015-06-02 13:11 ` [dpdk-dev] [PATCH 1/3] spinlock: " Roman Dementiev
2015-06-02 13:11 ` [dpdk-dev] [PATCH 2/3] rwlock: " Roman Dementiev
2015-06-02 13:11 ` [dpdk-dev] [PATCH 3/3] test scaling of HTM lock elision protecting rte_hash Roman Dementiev
     [not found] ` <CADNuJVpeKa9-R7WHkoCzw82vpYd=3XmhOoz2JfGsFLzDW+F5UQ@mail.gmail.com>
2015-06-02 13:39   ` [dpdk-dev] add support for HTM lock elision for x86 Dementiev, Roman
2015-06-02 14:55   ` Roman Dementiev
2015-06-03 18:40 ` Stephen Hemminger
2015-06-05 15:12   ` Roman Dementiev
2015-06-16 17:16 ` [dpdk-dev] [PATCH v2 0/3] " Roman Dementiev
2015-06-16 17:16   ` [dpdk-dev] [PATCH v2 1/3] spinlock: " Roman Dementiev
2015-06-17 21:29     ` Thomas Monjalon
2015-06-18 10:00       ` Bruce Richardson
2015-06-19 13:35         ` Thomas Monjalon
2015-06-22 15:32           ` Adrien Mazarguil
2015-06-29  9:34           ` [dpdk-dev] [PATCH] eal: fix cpu_feature_table[] compilation with -pedantic Adrien Mazarguil
2015-06-29 12:10             ` David Marchand
2015-06-29 12:19               ` Thomas Monjalon
2015-06-16 17:16   ` [dpdk-dev] [PATCH v2 2/3] rwlock: add support for HTM lock elision for x86 Roman Dementiev
2015-06-16 17:16   ` [dpdk-dev] [PATCH v2 3/3] test scaling of HTM lock elision protecting rte_hash Roman Dementiev
2015-06-17 13:05   ` [dpdk-dev] [PATCH v2 0/3] add support for HTM lock elision for x86 Bruce Richardson
2015-06-17 13:14     ` Thomas Monjalon
2015-06-17 13:48       ` Bruce Richardson
2015-06-19 11:08   ` [dpdk-dev] [PATCH v3 " Roman Dementiev
2015-06-19 11:08     ` [dpdk-dev] [PATCH v3 1/3] spinlock: " Roman Dementiev
2015-06-19 11:08     ` [dpdk-dev] [PATCH v3 2/3] rwlock: " Roman Dementiev
2015-06-19 11:08     ` [dpdk-dev] [PATCH v3 3/3] test scaling of HTM lock elision protecting rte_hash Roman Dementiev
2015-06-19 14:38     ` [dpdk-dev] [PATCH v3 0/3] add support for HTM lock elision for x86 Thomas Monjalon
2015-06-02 13:17 [dpdk-dev] " Dementiev, Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).