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=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_NEOMUTT 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 9D2E2C43381 for ; Fri, 22 Mar 2019 19:30:40 +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 6FD6C20870 for ; Fri, 22 Mar 2019 19:30:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gpxH+jfZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FD6C20870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=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-Type: Content-Transfer-Encoding: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=1IeBgkYuruqYiQ2g0DQDmCm3rimpfeU+5zoP2p0JVnw=; b=gpxH+jfZTrtu7QIGI3keACM7/ RWP6ihX4YOPAsQGcO70AmqO7CkyEXUNykpVWEm2uENGPe26fjxHjn4iQOSX8WZZf8AG1ad8p1HYp9 zbQC9jvH6FKKEgrd3CRjOXMOLYZR7ljbaxr3p06oFXdlqTLmRRUr4oCP1fqGTJOWza1jRZ7WPLRf7 blDjjmxCtoh0SlgDnKu9OZ6Cugu+snjlU+3aZflNcpuOdMVxSlTkG3yH5LuryfsaZub3uYLB1yXU3 1KzM1MBdsJe6Qdx4FwMQTf6hzrUqAJU3GhadyNcpUEunbYSwFmZ9SZnyBKlIfcimJCGzoF4GaGZtS hObMVbPJw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7PsB-000894-Bs; Fri, 22 Mar 2019 19:30:35 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7Ps1-0007zy-Rj; Fri, 22 Mar 2019 19:30:27 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B825BAFCF; Fri, 22 Mar 2019 19:30:22 +0000 (UTC) Date: Fri, 22 Mar 2019 12:30:10 -0700 From: Davidlohr Bueso To: Linus Torvalds Subject: Re: [PATCH v5 1/3] locking/rwsem: Remove arch specific rwsem files Message-ID: <20190322193010.azb7rmmmaclhal35@linux-r8p5> References: <20190322143008.21313-1-longman@redhat.com> <20190322143008.21313-2-longman@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190322_123026_045537_570150D2 X-CRM114-Status: UNSURE ( 7.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, Linux-sh list , Peter Zijlstra , Will Deacon , linux-mips@vger.kernel.org, "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, the arch/x86 maintainers , Ingo Molnar , Waiman Long , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-um@lists.infradead.org, linux-m68k , openrisc@lists.librecores.org, Borislav Petkov , Thomas Gleixner , "linux-alpha@vger.kernel.org" , linux-parisc@vger.kernel.org, Tim Chen , Linux List Kernel Mailing , "linux-alpha@vger.kernel.org" , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, 22 Mar 2019, Linus Torvalds wrote: >Some of them _might_ be performance-critical. There's the one on >mmap_sem in the fault handling path, for example. And yes, I'd expect >the normal case to very much be "no other readers or writers" for that >one. Yeah, the mmap_sem case in the fault path is really expecting an unlocked state. To the point that four archs have added branch predictions, ie: 92181f190b6 (x86: optimise x86's do_page_fault (C entry point for the page fault path)) b15021d994f (powerpc/mm: Add a bunch of (un)likely annotations to do_page_fault) And using PROFILE_ANNOTATED_BRANCHES shows pretty clearly: (without resetting the counters) correct incorrect % Function File Line ------- --------- - -------- ---- ---- 4603685 34 0 do_user_addr_fault fault.c 1416 (bootup) 382327745 449 0 do_user_addr_fault fault.c 1416 (kernel build) 399446159 461 0 do_user_addr_fault fault.c 1416 (redis benchmark) It would probably wouldn't harm doing the unlikely() for all archs, or alternatively, add likely() to the atomic_long_try_cmpxchg_acquire in patch 3 and do it implicitly but maybe that would be less flexible(?) Thanks, Davidlohr _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv