Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1240916ioo; Fri, 27 May 2022 04:49:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnWGQUohoVZT2z3SxaI5/FzOVJ9YGleIkpU7/dIYbcMvIZmIQqt6k+7D+ECHBKjg1/2R2W X-Received: by 2002:a17:902:bf45:b0:15c:df47:3d6 with SMTP id u5-20020a170902bf4500b0015cdf4703d6mr42149683pls.58.1653652198796; Fri, 27 May 2022 04:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653652198; cv=none; d=google.com; s=arc-20160816; b=q8em1tDhxsUeQP6zgvmH6e5kCtbhW6uUXsa7UkjB2KNCUCyhpuMPVsjcXOK1Lpyn6Z HYXXOBj7+/XHNCYSP4+LmKkZPLGaqb/0K9B6sNtaBKALVIjBiRR3MhN7A1XJxeLAT3Rg 1tD6hHpeJBAeZmMrPr7EkU2a1MpqvAx2lxybnRS5kkt+DbgXtdBq96J6Y8Hli7UtQivY ohfqp0gbTnmC8UwtUgUhWIbZMhmWbBiDXeQB0C0fh1Y8dMY0Zw51ONquPG75ABQ4wujM F9P6vfJS/bEJfBr2qv4e3u9FIkaFJrWuNrE595mUCfRsjsRWtkdu5Ft7ri4Ha1YRvz+0 NgFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KIrgpKkAzwB07gYimrtbZQWgxesfa74CNz+gljHxsDM=; b=Xm6UK8YQgnPy8s+kQ40cAHQ9qmWqZQdwP43J60RUBBoB52IKjUA1/TjpqQDH0RfyAA XMhaAlf/6mItI9fke9USHBgWXl04goGMN4A5fRqHIbJTrJeLUaicYnXDAuVyw8NJUAbj lRSd5rrm3iWrQdp7pH01kMke0F4HDf0uGeU+TcU6miNhVJIL3jhAYpDadUJ204cMHhpK osrJpK3qfEDcaEY4tq5lbnoiRUcdGi5+VSvhagx/6VNJ5aurhk16GJWj9pcpfHh0ArS8 XuWGme3fd3FXty3VbaPJ+MMRV0RHwEujDlaUbXDqABBNJPVV1iMkd0Oo0WMh84lYDyzB in1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Uw2QqULb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a1709029b8500b0016158ec5ac9si5160795plp.431.2022.05.27.04.49.44; Fri, 27 May 2022 04:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Uw2QqULb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244183AbiEZQ6y (ORCPT + 99 others); Thu, 26 May 2022 12:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbiEZQ6w (ORCPT ); Thu, 26 May 2022 12:58:52 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D684A3085 for ; Thu, 26 May 2022 09:58:49 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 1so2374935ljp.8 for ; Thu, 26 May 2022 09:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KIrgpKkAzwB07gYimrtbZQWgxesfa74CNz+gljHxsDM=; b=Uw2QqULbsgoG8dWkUYz5Wetvt9zrj+w2Z/3KG1NXe+Ga2SYOQA4ahHz0GCrZxRVxxs V+aWCEb61jpbUN2D2snj9yzTr4OzNyUFkAE5Zt5ZRUjf0jixHym11fMEvpdfrn+XIvS7 eBQrWbr/A3ETMNkjZcLBXDbPoHW+g5IGealpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KIrgpKkAzwB07gYimrtbZQWgxesfa74CNz+gljHxsDM=; b=1n5IhervGKYWeA6D4ClCfgIgACbpbfvx1iPph0rGnp3u/oNpbELGzEPokW7t09SO8a 59YqF/wS7FLSZXuq242wYXS6O5/RV4NfeYs9CCzw9spYuVJZtPVxlJtr7jbkvBf/WZMR i5fBwQCLtXgW68l8USO71StcLusw81HGQQ6dPLTWsZ15FMnW9V0lOkNCtTzusjgVKPgU hlztf9IpMcK+uOqxbZP+6lEC1hZZ44QAFuQyjfLYitBqcnyLtRgCa+KmAevI2Qmx/ZMh 5SlkAV3K1rXLamtRIsucfYuLtBberDaSbhv5j1RC5MGvlS+GpQDDJltJNIzP4q2BncZV ouxg== X-Gm-Message-State: AOAM531E3vzIn0kHfEg1PVOlxzrskU9NdsxNzluWNEkW3RHmfmCbk5Ew b9650p4apB+9322a1pTvrvJRNmKZIObKz00Y8h0= X-Received: by 2002:a05:651c:1246:b0:253:f0b4:a410 with SMTP id h6-20020a05651c124600b00253f0b4a410mr9957896ljh.288.1653584327289; Thu, 26 May 2022 09:58:47 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id e29-20020a19691d000000b0047255d211fesm434070lfc.301.2022.05.26.09.58.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 May 2022 09:58:47 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id bu29so3327478lfb.0 for ; Thu, 26 May 2022 09:58:46 -0700 (PDT) X-Received: by 2002:a5d:58cc:0:b0:20e:643d:e46a with SMTP id o12-20020a5d58cc000000b0020e643de46amr30854195wrf.97.1653583940350; Thu, 26 May 2022 09:52:20 -0700 (PDT) MIME-Version: 1.0 References: <871qwgmqws.fsf@mpe.ellerman.id.au> In-Reply-To: <871qwgmqws.fsf@mpe.ellerman.id.au> From: Linus Torvalds Date: Thu, 26 May 2022 09:52:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] locking/lockref: Use try_cmpxchg64 in CMPXCHG_LOOP macro To: Michael Ellerman Cc: Uros Bizjak , Catalin Marinas , Will Deacon , Russell King , Thomas Bogendoerfer , Heiko Carstens , "the arch/x86 maintainers" , Linux Kernel Mailing List , Peter Zijlstra , Thomas Gleixner , Waiman.Long@hp.com, Paul McKenney , linuxppc-dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 26, 2022 at 5:15 AM Michael Ellerman wrote: > > Do you know of a benchmark that shows it up? I tried a few things but > couldn't get lockref_get() to count for more than 1-2%. Heh. 1% for a small instruction sequence that is only handful of instructions and is used in just a couple of places counts as "very hot" for me. I assume you did the natural thing: threaded pathname lookup (with paths being of the longer variety to not be dominated by system call etc costs). Linus