From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) by dpdk.org (Postfix) with ESMTP id 37CD74A63 for ; Wed, 3 Jun 2015 20:40:15 +0200 (CEST) Received: by qcxw10 with SMTP id w10so8125766qcx.3 for ; Wed, 03 Jun 2015 11:40:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=KMONFYpVhxs3YWj7YY7yLMTAIdSguhrmrlUmiKp6OLI=; b=GF2ndkDK0/jCewvl6/n3plOcnCZzxfhLQBDbi4uzsNZt2wCnoz4sD5n/sZsY12Yvmj 5Nl++5s/VTEw/ePvqWVMI+v9FRE5QpadekjgoI1s2P66BKrkZhc0pabg+6SVRsUx8xTX ANH/eQLKxuuxP+G14LZyI6E39y2dqgEBSWV4ceKjFxdDIlVeHW51gDk1lPJuhZApK+Jq weQVUKBTQIbPSZ7EXLNUSlrHEByhLk1YAxi+gz+nqnAYwyEWjmVY0yq+12qHM/Sw/AMo Hia9YLsfPBZrGRLW3rc3g1NrlM7hAkYJu4hFO6seLIzkbvTed6JEJqU6DO1rcepubQ4f 6J5Q== X-Gm-Message-State: ALoCoQmSFlePc0ni5FE0S51e5kKz8jhs+f/iB5I8Dg3ME25U0lMHe39iL3byQCjGxO5mC5IR02g+ X-Received: by 10.140.235.147 with SMTP id g141mr37971585qhc.35.1433356814708; Wed, 03 Jun 2015 11:40:14 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id 138sm852776qhx.18.2015.06.03.11.40.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 11:40:14 -0700 (PDT) Date: Wed, 3 Jun 2015 11:40:14 -0700 From: Stephen Hemminger To: Roman Dementiev Message-ID: <20150603114014.7f1fb67a@urahara> In-Reply-To: <1433250693-23644-1-git-send-email-roman.dementiev@intel.com> References: <1433250693-23644-1-git-send-email-roman.dementiev@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 18:40:15 -0000 On Tue, 2 Jun 2015 15:11:30 +0200 Roman Dementiev 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 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 > You probably want to put a caveat around this, it won't work for people that expect to use spinlocks to protect I/O operations on hardware. Since I/O operations aren't like memory.