From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: Re: [PATCH 1/5] bonding: replace spinlock with read/write lock Date: Fri, 6 May 2016 11:32:19 +0100 Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Stephen Hemminger , Bernard Iremonger Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4ACC112A8 for ; Fri, 6 May 2016 12:36:14 +0200 (CEST) In-Reply-To: <20160505101233.191151ac@xeon-e3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?