From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DAF4C2D0CE for ; Tue, 21 Jan 2020 14:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D6C824653 for ; Tue, 21 Jan 2020 14:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hNjIz9F/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729127AbgAUOmp (ORCPT ); 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v8 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock Date: Tue, 21 Jan 2020 15:42:29 +0100 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-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20191230194042.67789-4-alex.kogan@oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane-mx.org@lists.infradead.org To: Alex Kogan Cc: linux-arch@vger.kernel.org, guohanjun@huawei.com, arnd@arndb.de, dave.dice@oracle.com, jglauber@marvell.com, x86@kernel.org, will.deacon@arm.com, linux@armlinux.org.uk, steven.sistare@oracle.com, linux-kernel@vger.kernel.org, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, longman@redhat.com, tglx@linutronix.de, daniel.m.jordan@oracle.com, linux-arm-kernel@lists.infradead.org List-Id: linux-arch.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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1733C2D0CE for ; Tue, 21 Jan 2020 14:42:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E14B2253D for ; Tue, 21 Jan 2020 14:42:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S7O65Z4q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E14B2253D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hws/6VadcLbPbnvucdfaGvXvA+WoAxBXzMv3AJCDBSI=; b=S7O65Z4qY5Bw6S rWYRNtRyeetzJIgZoWUtIuesJEGIP1IwG2pSkq7ggpxqE1GnXAn3ifHYx3BwuW8szEb56QxalguHY +0sPNHDrEcM1DMYbYJ/Jfks8ky32NK5qTTNN0LHW3UVgxvnAE25eDEvJa+JBbcPINFVwzn+QHzAOd gUyxgIuAHtDIhGI8MgqEFxmHoA6GS/kymPoG4HhurU/lCd6U1+OHOYfC029idOZ6B5KzJt+pjVz1Y HDnGftmMlFM53mkB7OVD3cp/Y1bgU2U30WJTn+85epPvo0iNSLkD1RaouqXgQl7FFm8E/rh595BBZ 9YkVj9DynmrTU0y+Ft+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1itujh-0003S4-8n; Tue, 21 Jan 2020 14:42:33 +0000 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 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-Disposition: inline In-Reply-To: <20191230194042.67789-4-alex.kogan@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, guohanjun@huawei.com, arnd@arndb.de, dave.dice@oracle.com, jglauber@marvell.com, x86@kernel.org, will.deacon@arm.com, linux@armlinux.org.uk, steven.sistare@oracle.com, linux-kernel@vger.kernel.org, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, longman@redhat.com, tglx@linutronix.de, daniel.m.jordan@oracle.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel