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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 D5DFDC43381 for ; Thu, 21 Feb 2019 14:15:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF9952070B for ; Thu, 21 Feb 2019 14:15:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728118AbfBUOPV (ORCPT ); Thu, 21 Feb 2019 09:15:21 -0500 Received: from foss.arm.com ([217.140.101.70]:45202 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbfBUOPU (ORCPT ); Thu, 21 Feb 2019 09:15:20 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DCC8780D; Thu, 21 Feb 2019 06:15:19 -0800 (PST) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 756DA3F575; Thu, 21 Feb 2019 06:15:17 -0800 (PST) Date: Thu, 21 Feb 2019 14:15:14 +0000 From: Will Deacon To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Arnd Bergmann , Borislav Petkov , "H. Peter Anvin" , Davidlohr Bueso , Linus Torvalds , Andrew Morton , Tim Chen Subject: Re: [PATCH-tip v2 04/10] locking/rwsem: Micro-optimize rwsem_try_read_lock_unqueued() Message-ID: <20190221141514.GE12696@fuggles.cambridge.arm.com> References: <1550263810-31947-1-git-send-email-longman@redhat.com> <1550263810-31947-5-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1550263810-31947-5-git-send-email-longman@redhat.com> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 15, 2019 at 03:50:04PM -0500, Waiman Long wrote: > The atomic_long_cmpxchg_acquire() in rwsem_try_read_lock_unqueued() is > replaced by atomic_long_try_cmpxchg_acquire() to simpify the code and > generate slightly better assembly code. There is no functional change. Might be nice to illustrate the improvement in the commit message, but it seems that try_cmpxchg is generally preferred for x86, so: Acked-by: Will Deacon Will