Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp312524yba; Wed, 3 Apr 2019 09:11:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCpYa4jO+pieUSbQyCjPngLj4SmDW4b96I3LozPSF7bIQQUG8aYSHKjnF02fNNDdDEhdzQ X-Received: by 2002:a65:6107:: with SMTP id z7mr444463pgu.313.1554307870736; Wed, 03 Apr 2019 09:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554307870; cv=none; d=google.com; s=arc-20160816; b=VHT9gD+dnnp6MpjZHoWLUU3f4NZxM//iSWeIL3GJWzqlBU7A2Ei/biWL8WMKB5EJAV cQ/dk8ucs5uj8whTo+5wugCNWaL+gaTbe56fq51crQk7YZuKc15H4dCxh9U6R4+GOv0z 1SncK89lHgw4KSP3MvRomjI89qi3jGoKAq1HXEa7qpREvbitGHQyLhVUMexl7bVt+sty fjrIy6e4aZh70GD+YX4RWYrOP1vWG4odbmfEDj9vhWvsd/m0Ixx3FRIfbUyUb6uC9ubs EM8WyR86P9e0sQ4Ava4OQBW9JMpCZpURL1FyljTdWiu/NYLG7GUgngV/TVI0iBiDN1Vz hcbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oxctlf33XRUqCqvjvLyuJJ32TcsfAlFm5J/QwPvH0xw=; b=fuIPTU802JTqhk8suOjrUHHNbuOAGfYIEKq7ubci6cVEMijRvqDuQvZxERcAM7baO9 nUyNK4EXfo5i+2AWXl6DocvGOHVPKX40rftQ0JZaJ2XRfqoG9uaKoARhYO8j9tl72/Pp LtwCeepznqZa0Q6beUl9r1w7JcjDnX7NBzqMMJz9EOknbHpLMROP8+nKqe+ePywSzKuh jVN8z4Nw6j8ZPt8Le5Xmca3lAsQ9PjnGYs5W8lvpgJlmlhaiOpSObLOkoyL7F9sZfg7g 92ZKFsXZSL4AE0AylJryuDO28lSGY4dXb3mwLOhs8If+nMpFsgG4nluaNY2/WafdelrK KSMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=y57sT1dO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si13893065plq.211.2019.04.03.09.10.55; Wed, 03 Apr 2019 09:11:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=y57sT1dO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbfDCQKN (ORCPT + 99 others); Wed, 3 Apr 2019 12:10:13 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43680 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbfDCQKN (ORCPT ); Wed, 3 Apr 2019 12:10:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oxctlf33XRUqCqvjvLyuJJ32TcsfAlFm5J/QwPvH0xw=; b=y57sT1dO2KjmuSwmkOuNr/Gyy NIEztjZ0SL9wEXDevahqEBZzDBdEJ5dEA7DzEbfIibjdIX8BjbSt7yeXUM0rbXqsbSTTslqL9VsYn ltC83Ww8awqiUWTzTLTpCZTrJykBBo29+EyFvClbnDavQ6swQGotFpO6gECG0ef+FuzY4Hcdi+AD+ MqDckoRs+1Chp4nrTAF+YlzHgK9AWRQDIEb5e67yqXpWUajT4quBRrEz5pLobpgsezv6VUvXZVfqV UcsCtp5MEkxRE7WtVTu9V3b4Zd07wwb2yFl5mky5Rnx70nY8Xu/suomXeLtyNa23d5B4zl65fNQMy ppi1gwUcA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBiSi-0003s2-Hg; Wed, 03 Apr 2019 16:10:04 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3DF842038D44F; Wed, 3 Apr 2019 18:10:03 +0200 (CEST) Date: Wed, 3 Apr 2019 18:10:03 +0200 From: Peter Zijlstra To: Alex Kogan Cc: linux@armlinux.org.uk, mingo@redhat.com, will.deacon@arm.com, arnd@arndb.de, longman@redhat.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, bp@alien8.de, hpa@zytor.com, x86@kernel.org, steven.sistare@oracle.com, daniel.m.jordan@oracle.com, dave.dice@oracle.com, rahul.x.yadav@oracle.com Subject: Re: [PATCH v2 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock Message-ID: <20190403161003.GL4038@hirez.programming.kicks-ass.net> References: <20190329152006.110370-1-alex.kogan@oracle.com> <20190329152006.110370-4-alex.kogan@oracle.com> <20190401090653.GF11158@hirez.programming.kicks-ass.net> <20190401093345.GA14281@hirez.programming.kicks-ass.net> <7A8A6827-BF79-47FC-99A1-C9EE00D9C3B1@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7A8A6827-BF79-47FC-99A1-C9EE00D9C3B1@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 03, 2019 at 11:53:53AM -0400, Alex Kogan wrote: > > One thing we could maybe do is change locked and count to u8, then your > > overlay structure could be something like: > > > > struct mcs_spinlock { > > struct mcs_spinlock *next; > > u8 locked; > > u8 count; > > }; > I was trying to keep the size of the mcs_spinlock structure for the non-NUMA variant unchanged. > If this is not a huge concern, changing the fields as above would indeed simplify a few things. Well, sizeof(struct mcs_spinlock) is unchanged by the above proposal (for x86_64). And I don't think it matters for x86, which is very good at byte accesses, my only concern would be for other architectures that might not be as good at byte accesses. For instance Alpha