From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id D5620388F for ; Fri, 6 May 2016 17:55:27 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id 77so50988193pfv.2 for ; Fri, 06 May 2016 08:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FmKLvTmSB5o1yhFCBVG62+H2sfsdV4ZCP9wnWs2BNPE=; b=FL+PPBmWhVgntS0FElwSDz50KFyzFi0M6Bm6DFnEKU/DNg6dgIGg8SeC49OaJGquV8 edH7XDww8DemofNWCgGKqXPnoMK7IBC5li66JYdxfiAKgzIHVt4v6fm3vG4fHLV8Lew+ jtuuU4SQ2cKrDD4hPlcpvXqfSVCT3M4MYr7qxLozkihoxGZxPjs+Jtqb5RxTHtIQjl4N vRcqVcOVqwosfjGoIWeEo8Oa5DZpr6xm/q/4kpLYe6MXP2aVv5ujJa8r1RJnhWOtAGXc LDWMizGl6CbtR9f/Kz7CWXPPqb+1AgeviWa2Z6Wz1L7VPJlOZRSyq7mHmwH7yf0jnSFn Nj7w== 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-transfer-encoding; bh=FmKLvTmSB5o1yhFCBVG62+H2sfsdV4ZCP9wnWs2BNPE=; b=VJ/ijp1HHFg0n7yn9e9r33VkIZXU4+8zsXzWiduYVODbQE6NZQqJr7U2z95YUmikGk mnBSeo+7bY6PHZx3xJHQcxMSsgcuBUz8H3zPUZYupK6q7Zo2Y/syWSdWA0QpkX2U/DCU k6G9B1gbCfwu0JUlMpcfe+mJ09sMeaUPg78KitrkCjza48R3ZrLrCHCrGRe7scwsQRSM ePLfbWJ5SX6qbW70R+w2QCWXuHiL+bYv9mz02tbmVKwFYIYAnSteoR67dNCO7W9nJIM3 9UUb4JQ+NnLJHuj5KGmqyo+dIg8K3QFNW5y3KNeMg11Q/+lY1x5ErPhEClPW5gma4mwj kcyA== X-Gm-Message-State: AOPr4FWcC5L06t8QYbGFvF3qq2ebD/PX9nGPCkBl0fMkaNqu9p7CA/T0p5vLEwpHS8RwSg== X-Received: by 10.98.13.88 with SMTP id v85mr29603538pfi.150.1462550127173; Fri, 06 May 2016 08:55:27 -0700 (PDT) Received: from xeon-e3 (static-50-53-72-186.bvtn.or.frontiernet.net. [50.53.72.186]) by smtp.gmail.com with ESMTPSA id g77sm21973865pfg.78.2016.05.06.08.55.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 May 2016 08:55:26 -0700 (PDT) Date: Fri, 6 May 2016 08:55:39 -0700 From: Stephen Hemminger To: Declan Doherty Cc: Bernard Iremonger , dev@dpdk.org Message-ID: <20160506085539.1ece142c@xeon-e3> In-Reply-To: <7f47b47d-945a-c265-4db3-dc0d6850a348@intel.com> References: <1462461300-9962-1-git-send-email-bernard.iremonger@intel.com> <1462461300-9962-2-git-send-email-bernard.iremonger@intel.com> <20160505101233.191151ac@xeon-e3> <7f47b47d-945a-c265-4db3-dc0d6850a348@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/5] bonding: replace spinlock with read/write lock 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 May 2016 15:55:28 -0000 On Fri, 6 May 2016 11:32:19 +0100 Declan Doherty wrote: > On 05/05/16 18:12, Stephen Hemminger wrote: > > On Thu, 5 May 2016 16:14:56 +0100 > > Bernard Iremonger wrote: > > > >> Fixes: a45b288ef21a ("bond: support link status polling") > >> Signed-off-by: Bernard Iremonger > > > > You know an uncontested reader/writer lock is significantly slower > > than a spinlock. > > > > As we can have multiple readers of the active slave list / primary > slave, basically any tx/rx burst call needs to protect against a device > being removed/closed during it's operation now that we support > hotplugging, in the worst case this could mean we have 2(rx+tx) * queues > possibly using the active slave list simultaneously, in that case I > would have thought that a spinlock would have a much more significant > affect on performance? Right, but the window where the shared variable is accessed is very small, and it is actually faster to use spinlock for that.