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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 D2F71C433FE for ; Tue, 8 Dec 2020 04:19:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABFF021E92 for ; Tue, 8 Dec 2020 04:19:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbgLHETN (ORCPT ); Mon, 7 Dec 2020 23:19:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:38866 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbgLHETN (ORCPT ); Mon, 7 Dec 2020 23:19:13 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 326C2AC9A; Tue, 8 Dec 2020 04:18:32 +0000 (UTC) Date: Mon, 7 Dec 2020 19:53:14 -0800 From: Davidlohr Bueso To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org, Phil Auld Subject: Re: [PATCH 3/5] locking/rwsem: Enable reader optimistic lock stealing Message-ID: <20201208035314.rwz72kgn5apr2whm@linux-p48b> References: <20201118030429.23017-1-longman@redhat.com> <20201118030429.23017-4-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201118030429.23017-4-longman@redhat.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Nov 2020, Waiman Long wrote: >If the optimistic spinning queue is empty and the rwsem does not have >the handoff or write-lock bits set, it is actually not necessary to >call rwsem_optimistic_spin() to spin on it. Instead, it can steal the >lock directly as its reader bias is in the count already. If it is >the first reader in this state, it will try to wake up other readers >in the wait queue. > >Signed-off-by: Waiman Long Reviewed-by: Davidlohr Bueso