Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1239774pxp; Thu, 17 Mar 2022 05:59:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq774keNqpoC5Qq0w9LQwLciMv4/EHCZXH79w+hcf1v57DKMIr/35tUTBc92Oi/SqBczPy X-Received: by 2002:a05:6a00:2284:b0:4f7:86a3:6f6 with SMTP id f4-20020a056a00228400b004f786a306f6mr4771621pfe.20.1647521945957; Thu, 17 Mar 2022 05:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647521945; cv=none; d=google.com; s=arc-20160816; b=W/k6X1T9ewB78owbfaN54UBLIahDilOzDkUDCfJirdS4tvEa1k2YucXyLedC9IVESl ZYZ7QoAzBKUytdLTXUNxHPGvv2FUwdZhgjQKgEjaZ0PfZLADaVgd4At85i7vAqPMJSmu co1/Ku4xRAAH9i+gRzb28RT6iuVT85J9SYWwBzMiluDkLmtVwEYMEiL8hji9RUOHkbZu bcM6H+R8YDLo0NVmKnFJxJdsefhwR6OFPFAzZ/5NFPRaocyLGCWkbB/v+5xgf21DBMiM PynsZ/6meum2RoyY7RrgA3ArmtD6zlsJKW8FzpfKboPqST+BqHpyYvyoKdeJy2r9JoUN PLdQ== 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; bh=JCXTe+Q0FHxrkq4k2StWnSNK0TO6bGi1xVhZSsMPu+Y=; b=0D2bBnF+u5eCrJaEJfRPtxUTxJ0GnAtfGafaGy7+2rkJwiey064WdE8GBC4DAIrGI0 +XdSGIUXvuSk+nDeOr6n48SF3ohlI2z50WQ+d30O8+iuWfiwjfq60biH6Y9JpmU5luHQ 0S9PgtqUtGJcP+zsBJd/vju0+HAO54x2x3TIhdIcVEFCV+yp2nnyScQX0UIGzYX249hO L1KPsaO+VFNMZypcxGfZm9Twf/vQBBGnxL9U/XzLEbZCML1dzh7XmhLTYi3t3jApYaP9 kDve1jIGV4RzaGXAMxgZI4ZTMyU9RMoWYzCsy8SZGsqsHG2b7sfRhExdfT99xvsji7p+ FliA== ARC-Authentication-Results: i=1; mx.google.com; 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 mi1-20020a17090b4b4100b001bf4308d1fesi8970754pjb.93.2022.03.17.05.58.53; Thu, 17 Mar 2022 05:59:05 -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; 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 S230386AbiCQJS0 (ORCPT + 99 others); Thu, 17 Mar 2022 05:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbiCQJSZ (ORCPT ); Thu, 17 Mar 2022 05:18:25 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29215124C32; Thu, 17 Mar 2022 02:17:08 -0700 (PDT) Received: from mail-wr1-f42.google.com ([209.85.221.42]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MtfRp-1oONmW22Jz-00v6tb; Thu, 17 Mar 2022 10:17:07 +0100 Received: by mail-wr1-f42.google.com with SMTP id r10so6444443wrp.3; Thu, 17 Mar 2022 02:17:07 -0700 (PDT) X-Gm-Message-State: AOAM533aOR4+cyrobtkfyRj1oDMGMwF63p3OjAuP3F0IbfwWZTM5ZtbY mhZKKjjY94Gsh9lcxdYiegB9PoN8ACf5kJmgXh4= X-Received: by 2002:a05:6000:1e0d:b0:203:e950:7b74 with SMTP id bj13-20020a0560001e0d00b00203e9507b74mr1946333wrb.219.1647508627012; Thu, 17 Mar 2022 02:17:07 -0700 (PDT) MIME-Version: 1.0 References: <20220316232600.20419-1-palmer@rivosinc.com> In-Reply-To: <20220316232600.20419-1-palmer@rivosinc.com> From: Arnd Bergmann Date: Thu, 17 Mar 2022 10:16:50 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/5] Generic Ticket Spinlocks To: Palmer Dabbelt Cc: linux-riscv , Peter Zijlstra , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Paul Walmsley , Palmer Dabbelt , Albert Ou , Arnd Bergmann , Jisheng Zhang , Kefeng Wang , Openrisc , Linux Kernel Mailing List , linux-arch Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:A8t+JNQ6hnfKWa5ZvcXXjImC9GHMIrJRw1UUen1iqsyraxUR3B2 IoPgjisorvwAoB+Zyb1Vr6LscrQ0ft+lf6/vlyMhxuoK7BmeSDmEfycB7T36OFb1hGh9Qjh cDYXU1F9M9OvcpV6EIrlccH1mqZmjOQiC7DCeLZI7NV+dzj0Buh6H6DhTJ4aBxWvmkWVd5R cHSLUKq3tcy7AUApZ2BUA== X-UI-Out-Filterresults: notjunk:1;V03:K0:0maHK8ZCjz8=:RcAArPyC15KFEFlLUXqXie +YrGxC300capN6HgP2eEXhvAFuBurqss1Eff1jBdCv0spP460aIftn0ii1An5MWa9l7w0Mp7g mdFQIWlsHiWqAo6Bm4gifactIrEo7L9vkUHNCZJL4kPfpJ2aue+zPQ2/d2e+nnbJASbRNYctP 20INB5uJaIZfSVai1jzWAZs8fpq6NrM1ZC+EY+Fgb8Gh3iMc15lT7UJ5gmblObQgE/g5TMP8t PqHQspg9xo6EizCocgwjAQ6KQ2yEe6BCVWIHdIe8HiTgfidi4a5bcuhrkQ2kQF+z0c301GGjp MYYBse3vxbsWCds2Rt0Pp3gN48ionkcU124WFMRkbvjx64S3CmKkcfQRDr0P69vWeapUzLZPh U/QSE93IHG8Z4ji92VouT8ReNq8GJjuGpwXNFqFBjmaW54JtwZzyJ4HIXxeqfsWXVGxBvQ3ij h34AGJalj9gLMDYiE0K2eV9L8gCjVMds9aD0LrLMeY3zYsO3jU0a16T3LeMh/MrFYbQPYOOEL GIIjxbY/cXk3JorOmN4lYslu7rPDMcylHOR7nj9HPHIHAEJpbt+s8ivcwQpl1887oV7OLx2J+ fZpr+EkAjQGdctMA2QHCaxI+ywzVguFc9S9oTqc8otEJclm5kbn5V69QEQvQj7cinoesPwhkV z3FvNv2nQnijBabHLw7YZ9BI1XfAArtDu2crLLA+g1fsWv/+CRSqvl38JViBBcGO+wSfEjG+4 DsPJxC3kD9Vbad+TgjE0xaJiAeHLXnVJuPPzDu7XppI6+EVkOzvievc9AFyanPYPesKmJK6B/ KXfve/WAFlTd1v/rWUVdhAq4AaM2OIWslIssKe6YgBXEOCjSJM= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Mar 17, 2022 at 12:25 AM Palmer Dabbelt wrote: > > Peter sent an RFC out about a year ago > , > but after a spirited discussion it looks like we lost track of things. > IIRC there was broad consensus on this being the way to go, but there > was a lot of discussion so I wasn't sure. Given that it's been a year, > I figured it'd be best to just send this out again formatted a bit more > explicitly as a patch. > > This has had almost no testing (just a build test on RISC-V defconfig), > but I wanted to send it out largely as-is because I didn't have a SOB > from Peter on the code. I had sent around something sort of similar in > spirit, but this looks completely re-written. Just to play it safe I > wanted to send out almost exactly as it was posted. I'd probably rename > this tspinlock and tspinlock_types, as the mis-match kind of makes my > eyes go funny, but I don't really care that much. I'll also go through > the other ports and see if there's any more candidates, I seem to > remember there having been more than just OpenRISC but it's been a > while. > > I'm in no big rush for this and given the complex HW dependencies I > think it's best to target it for 5.19, that'd give us a full merge > window for folks to test/benchmark it on their systems to make sure it's > OK. RISC-V has a forward progress guarantee so we should be safe, but > these can always trip things up. This all looks good to me, feel free to merge the asm-generic bits through the riscv tree. Regarding the naming, my preference would be to just use this version in place of the (currently useless) asm-generic/spinlock.h, and just naming it arch_spin_lock() etc. This way, converting an architecture to the generic ticket lock can be done simply by removing its custom asm/spinlock.h. Or it could stay with the current name, but then have a new asm-generic/spinlock.h that just includes both asm/ticket_lock.h and asm/qrwlock.h. Arnd