From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 48A5C5B34 for ; Fri, 28 Dec 2018 00:41:48 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id g9so9305825plo.3 for ; Thu, 27 Dec 2018 15:41:48 -0800 (PST) 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=KYKT61FZog1MLaVQGk/SxOoqcrFATGBrArv1aHOcdUM=; b=X+z5co+vqxhFGG1QAqh7sghLa3ZR9wyuTNCpS1PiOSVSYU9r+hnx0+dkckEfXTZDKr xD3Lajxn6usdDRb9n3E4dVf6JyjfStlvL/IIMg/jlVo48dK7X27fIC616ATYfOXUCL1c F5SvQ+wj7Zmo3LJjj7zqRlzCUQgrUWrkCtF3JJqSg5BhE7Q/fH8Gx9D1dXmLuDIneQHx STmN5Rzf3KtN51iPHh/0WKOxfa+B2qNG7v3TuFjXYKP8RZfMOSfy4fCJMT6xWf6ApxqP tR7WoqTCmm9bEHCXcI2lF+JDIj2JOVkp18AL3GdYpG8Vb3QfTxpEOBWgdSatZa2AH6ke jTwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KYKT61FZog1MLaVQGk/SxOoqcrFATGBrArv1aHOcdUM=; b=i1Wj67yFU3YiI6XBKmtkiOxwuAIY+go9aA853sQnpFA/FlVwotKx5Y1yoBt/xczhsF A7oEkqmoaK824rhJ98/7ypNKrw5rpyzqpTQhf0l6YEC2PZbn2UL/opMxt5wmr/sjR6ey lNbYueBSXPc+/6hMvXHgdF9m/pJ3zt9fAU5KE2CiKP61U2rz6g+1Jh41mzWQ8dSegff8 r4avA8+pmDrQdl4Oct2BC9rElGE34yA1994N9EVDBZwbrof49+YrDKSIl3H6bsUNW/4q AMhGtpSIa0tAjkCz6lL3oCWQIUMH9UDQklf/FhXJK8cONPVWMM+BOqckeEuS8n04pn+4 XfKg== X-Gm-Message-State: AJcUukd8zFR5O4JP9Kneql7eyHpF7tcunvbB5DOg/MEu7YJE3A+C5WlC CIu5wjb1Ng0I+wAgXjprVqgu5g== X-Google-Smtp-Source: ALg8bN7nzOe0zuHOztdVm2DJtulJgwZwJOvokSwfCH6jTEBJ5K5QJrgGosardT4QG4CRDWOzEtaCAA== X-Received: by 2002:a17:902:e18d:: with SMTP id cd13mr25439511plb.262.1545954107246; Thu, 27 Dec 2018 15:41:47 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c7sm75923133pfh.18.2018.12.27.15.41.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 15:41:47 -0800 (PST) Date: Thu, 27 Dec 2018 15:41:43 -0800 From: Stephen Hemminger To: Jerin Jacob Kollanukkaran Cc: "Gavin.Hu@arm.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , "chaozhu@linux.vnet.ibm.com" , "nd@arm.com" , "bruce.richardson@intel.com" , "thomas@monjalon.net" , "Joyce.Kong@arm.com" , "hemant.agrawal@nxp.com" , "Honnappa.Nagarahalli@arm.com" Message-ID: <20181227154143.7eb56fcc@shemminger-XPS-13-9360> In-Reply-To: <235244228ee4d6b30f268fc72837c6b0790d7037.camel@marvell.com> References: <20181227041349.3058-1-gavin.hu@arm.com> <20181227041349.3058-7-gavin.hu@arm.com> <47217c425060db295626c741b9e83f17b63a39bd.camel@marvell.com> <235244228ee4d6b30f268fc72837c6b0790d7037.camel@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [EXT] [PATCH v3 6/6] spinlock: ticket based to improve fairness X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2018 23:41:48 -0000 On Thu, 27 Dec 2018 12:08:26 +0000 Jerin Jacob Kollanukkaran wrote: > On Thu, 2018-12-27 at 10:05 +0000, Gavin Hu (Arm Technology China) > wrote: > > > -----Original Message----- > > > From: Jerin Jacob Kollanukkaran > > > Sent: Thursday, December 27, 2018 2:58 PM > > > To: Gavin Hu (Arm Technology China) ; > > > dev@dpdk.org > > > Cc: david.marchand@redhat.com; chaozhu@linux.vnet.ibm.com; nd > > > ; bruce.richardson@intel.com; thomas@monjalon.net; > > > Joyce > > > Kong (Arm Technology China) ; > > > hemant.agrawal@nxp.com; stephen@networkplumber.org; Honnappa > > > Nagarahalli > > > Subject: Re: [EXT] [PATCH v3 6/6] spinlock: ticket based to improve > > > fairness > > > > > > On Thu, 2018-12-27 at 12:13 +0800, Gavin Hu wrote: > > > > --------------------------------------------------------------- > > > > ---- > > > > --- > > > > From: Joyce Kong > > > > > > > > The old implementation is unfair, some threads may take locks > > > > aggressively > > > > > > I think, one issue here is x86 and ppc follows traditional spinlock > > > and > > > arm64 will be following ticket lock for spinlock implementation. > > > This would change application behaviour on arm64 compared to x86 > > > and > > > ppc. > > > > > > How about having a separate API for ticket lock? That would give, > > > # application choice to use the locking strategy > > > # application behaviour will be same across all arch. > > > > Ok, will do in v4 to have a new named rte_ticket_spinlock API. > > I would prefer rte_ticketlock_[lock/unlock/trylock/is_locked] name > instead of rte_ticket_spinlock_lock etc to reduce the length of the > API. NAK to adding new API for this. I want the best possible locks for all applications and all architectures. These should be called spinlock so there is no requirement for application to change to get better performance. Why not just implement the best algorithm across the board. Yes, this means collaboration or working on the other guys architecture.