Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2059802imj; Fri, 8 Feb 2019 11:52:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IYWP6+LW8ssSwhmKS/Kmz28WM0GGYybZCB1THfU5IoBlDicL3qqunn8TUgoy8iW54Jmx4KU X-Received: by 2002:a63:cc4e:: with SMTP id q14mr21781018pgi.291.1549655564813; Fri, 08 Feb 2019 11:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549655564; cv=none; d=google.com; s=arc-20160816; b=q5QSQVGoa0+3cfjN5bwNs6P543r0nS3jtqTsPLCn6OZVOaTOS2/0JPKLpnWKSt77em KYsUVQYPe4c1evxj6u8/nlAtlUJjxKDxaNcMYbi/1nvkCkY/616/Ovpne4zhCx1sVwku NAiLzfAP5AUIRR4067No3I3HmIttFIamjnd2v7WBoglXBTZUcFrjIP2C2lzF0XpbylHM WZN2bRbkhNbgUD63qu4afxncDBzHCIBwM5cWAKbBrNNPU39a/t7wH9hiGKINM09dh0uX I4Gr2BOLoxBdkwg1a40qIb/EhHCVxaAGC6QZNT6/F+Y9j1V3UzRh3TcIdrI/c8l50LLS UyZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qOYQNrLIv4ghYg9cJs/kFayOVviMNWKea8x1M/btUwQ=; b=ip1OiQTA+cKXLtwNifrsKWUaG8b1pM8zGF3j5yDzVOKsetngN2Iwlr2Y/58UC5qrMt hqsZBUQaaB+nAfrOsXbjAk6xBG7Hz0ceqZmb31r3qpXuxX1yUTMDNNiZePiH7I382+lw QwQXz0gJ6+jvD2G7PfhpWLiMyBqEXRbGLdz1W3NQ5olg3rPxTM7hjyFUN+SMIwOu+p5T kRNWgZjYn9dPYH4BHlEpIFqBVX3eORAnbT+9pWbh+zND7TKkQvG1TBUwoLb5n++gpWiu Gvz745CFXaJZ+4RVq/F44vD24Avyih1Mq2sr9xBTJwbm3hJZOeSFw7rmzhqi+zvNuZDm SOKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OyX0wzEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si2902960plr.55.2019.02.08.11.52.28; Fri, 08 Feb 2019 11:52:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OyX0wzEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbfBHTvB (ORCPT + 99 others); Fri, 8 Feb 2019 14:51:01 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37209 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbfBHTvB (ORCPT ); Fri, 8 Feb 2019 14:51:01 -0500 Received: by mail-lj1-f193.google.com with SMTP id r10-v6so4016451ljj.4 for ; Fri, 08 Feb 2019 11:51:00 -0800 (PST) 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=qOYQNrLIv4ghYg9cJs/kFayOVviMNWKea8x1M/btUwQ=; b=OyX0wzEFwz/6B3oUovySoSdj87UyroJwU08G3xNJoOnjsbu6Dq0hCgkf1L42WN6nW1 jwoJPZp5H1TptNE7ujv4YSzeQ1S9iqAxD7F1/8fIrL0nE3FasZpSYcLqdNGwta+XmVQT r5DkKnmqomQZhOV3nS7bhb+cUUVEYNQaa28wc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qOYQNrLIv4ghYg9cJs/kFayOVviMNWKea8x1M/btUwQ=; b=mDGF3Qg0qg13tLcR8JkxzRd5tbfmOfnrczwjDKlAhFsN1xwS9MrhEN0gKUaB22YUE8 XrgERnpLQ4J+4XLSnLytWZNr7oa0BH9sv9NX/ubvgGVfG9q6bAySA4GeaMpG1zzQ3bh3 3Kh/18O3TL2D7C2HfmmjPmt60dj/5+aN+Vz4m7ymkl+2HYt5qu+N5KGfzNPq2unVLCki btjbk9Kxf6IRv8iycVrHUT6w1q9097ukCDx9Ls3/eigA3o5STRJXXOx2b7zWwKyz5XyY egEiZ//jE9ZsFr4HjP74KtMX8IbFwo4KLxACtrlKh3pUE9DvmWlbGRv5bDjcRZ8yZbvt /M+Q== X-Gm-Message-State: AHQUAuYnl2ael6iHCD6e2vvTJSeJ1vP6mLa/CKAqq6/sUrsXP9TmgiRQ i2UAtw7bfdTOrmxfIUAZUTW21f7b7zwD5A== X-Received: by 2002:a2e:7d04:: with SMTP id y4-v6mr9854031ljc.127.1549655458918; Fri, 08 Feb 2019 11:50:58 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id l7sm574728lfc.55.2019.02.08.11.50.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 11:50:57 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id q12so3459732lfm.0 for ; Fri, 08 Feb 2019 11:50:56 -0800 (PST) X-Received: by 2002:ac2:4191:: with SMTP id z17mr14335535lfh.117.1549655456495; Fri, 08 Feb 2019 11:50:56 -0800 (PST) MIME-Version: 1.0 References: <1549566446-27967-1-git-send-email-longman@redhat.com> In-Reply-To: <1549566446-27967-1-git-send-email-longman@redhat.com> From: Linus Torvalds Date: Fri, 8 Feb 2019 11:50:40 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , Linux List Kernel Mailing , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Linux-sh list , sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arch , "the arch/x86 maintainers" , Arnd Bergmann , Borislav Petkov , "H. Peter Anvin" , Davidlohr Bueso , Andrew Morton , Tim Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 7, 2019 at 11:08 AM Waiman Long wrote: > > This patchset revamps the current rwsem-xadd implementation to make > it saner and easier to work with. This patchset removes all the > architecture specific assembly code and uses generic C code for all > architectures. This eases maintenance and enables us to enhance the > code more easily. > > This patchset also implements the following 3 new features: > > 1) Waiter lock handoff > 2) Reader optimistic spinning > 3) Store write-lock owner in the atomic count (x86-64 only) The patches are kind of hard to read, with most of them just doing prep-work that doesn't necessarily matter to the big picture. What I'd really like to see is (a) an overview of the new locking logic (b) what's the new fastpath case (c) some performance numbers to explain the changes from a "this is the point of the whole exercise" standpoint. And yes, I realize that the lock handoff and optimistic spinning is a big deal, since I've seen the same regression numbers that presumably caused this effort to be resurrected. So it's not that I don't find this intriguing and worthwhile, it's literally that I'd like a summary not so much of the individual patches, but of the new model. Please? Linus