Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3767866ybl; Tue, 21 Jan 2020 06:43:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwrdTK1A93jPuAKhzbHjC9xK06sscFCfaobtvAgXl5WhFGy7uJWTv5/0bG6MLlZoVsUpyax X-Received: by 2002:a9d:6418:: with SMTP id h24mr3799851otl.172.1579617831288; Tue, 21 Jan 2020 06:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579617831; cv=none; d=google.com; s=arc-20160816; b=xEhG/NzxvpeFcBasfSW2aJ9QnAIWHRT17P9HqBn4RUwdm2wPeCEWf7cObfFG+9Qsg5 4TrHwmHhSA90/iyUQY+q/gSMQDeiW4mt+jhQZQSxCJ23wNtp6K8iADWeO6ujnf9gedI9 6f04NzeZVdnch9DjVJmC4nFSOuAA2gYT+eWcunCfWyXrhtvAI1Xrbkit2gyDSeb31rKd zcW3o4oamt01GsUHGD9fJs9MhrWQ9h+9GqCu2H6Z76AdyjUByoeWaOq+EEG0kb+MD6ue nHrIg7Mg7x/JkywW2NGNATHE0XNpTP57+7g6ySpMGXs60SRVe1+Ml4BAr8AG+ut0+TJy qWiQ== 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=LYJn9+5CbWSB4FBZhh3YoGzq2rmbDVPtAhqCEt95EvU=; b=EL1pTEK5d2cW39q4YwdmUXPoioDCiO2xY8Tmm+6zEnccRkd/USFMiL2pmx+PyKpIiz pED2V+aJZRjp7rUPUjWfGuRYe/oOcetrReJ0N07vLC8FFn0XuwPxaXSWeiCmTfRqgwsw RHHmqNdtFoRr2qnf8DyXQXDFGDr+ZdmJDqmFjs73HqwtthC/oAvOlu5EzAeBWaTtj3dC 2f0A+C5U+yXAWv7XvOnV4dXCwMrKSV8Pye9Gc3lqsboxdN/GBWMhkTL+FxqFnM6iGEQD qtuD5KzTD91VrxjXkL5u38yMhfs7MCYwwoHvTTo6Hxiwt+TBTRTasqNCSPZFLDnaN2SN AMMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="hNjIz9F/"; 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 s17si22750127otq.78.2020.01.21.06.43.38; Tue, 21 Jan 2020 06:43:51 -0800 (PST) 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=bombadil.20170209 header.b="hNjIz9F/"; 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 S1729052AbgAUOmp (ORCPT + 99 others); Tue, 21 Jan 2020 09:42:45 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52906 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728186AbgAUOmp (ORCPT ); Tue, 21 Jan 2020 09:42:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=LYJn9+5CbWSB4FBZhh3YoGzq2rmbDVPtAhqCEt95EvU=; b=hNjIz9F/QmBXSj74UtIYdAlFN 7eASKNLLIFcYl5vjZI6vkrBPfDUCVBNgLut2EhZNOKEuBmmDeYCd6bvAKqdmrEVyAA/th/d9igh5b zNfK5siY2xQCCwiHoAvkMMy6SU6oknLhlo1/YCj5OW0hH3yOyb89RGrPukkuzWsKARavGysszBbNz cpUVR/tGezXeoGd6RtIqypE9rFpCUdgu1vLv9eAdAkxU0UEIrhkRMHaSpn65HXYrKXcK65e2P0+1v /lDGqboPDBM28BTjC0y6oweDFTIV8XhFFuaa++jS0qJqEsXUHNaRsX9OsnktpdPBREoVr9XiR1ATu zGTqYuwQw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1itujf-0003Rf-BK; Tue, 21 Jan 2020 14:42:31 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 300B5300B8D; Tue, 21 Jan 2020 15:40:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5DCF92B6F0C48; Tue, 21 Jan 2020 15:42:29 +0100 (CET) Date: Tue, 21 Jan 2020 15:42:29 +0100 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, guohanjun@huawei.com, jglauber@marvell.com, steven.sistare@oracle.com, daniel.m.jordan@oracle.com, dave.dice@oracle.com Subject: Re: [PATCH v8 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock Message-ID: <20200121144229.GN14914@hirez.programming.kicks-ass.net> References: <20191230194042.67789-1-alex.kogan@oracle.com> <20191230194042.67789-4-alex.kogan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191230194042.67789-4-alex.kogan@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 Mon, Dec 30, 2019 at 02:40:40PM -0500, Alex Kogan wrote: > +#define pv_wait_head_or_lock cna_pre_scan Also inconsitent naming. > +__always_inline u32 cna_pre_scan(struct qspinlock *lock, > + struct mcs_spinlock *node) > +{ > + struct cna_node *cn = (struct cna_node *)node; > + > + cn->pre_scan_result = cna_scan_main_queue(node, node); > + > + return 0; > +} The thinking here is that we're trying to make use of the time otherwise spend spinning on atomic_cond_read_acquire(), to search for a potential unlock candidate? Surely that deserves a comment.