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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77822C433EF for ; Mon, 4 Jul 2022 13:46:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234047AbiGDNq2 (ORCPT ); Mon, 4 Jul 2022 09:46:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbiGDNqX (ORCPT ); Mon, 4 Jul 2022 09:46:23 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB86F2711; Mon, 4 Jul 2022 06:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9KSp83B2HRrIjEIK0/a7lJrmsuqlIZtZe0Q7lj9gHs0=; b=BczO17nwDoPRhpsSqmE5BjhON5 j1HdkyxD9RPWKjGJVu9nYzRaWyNXM7qbeNkCN+/rnKhIh9PdgnCuQy0gr5nxnWzptHVlAZIw7TmqD 7SKZ8bMcE6pF6hUT4+YfcUCViaEcC6COLv/Ntix+CAKrRyCnpinxt1oE5rHoyuwfSO2AKZzqTQ1nz Krq1OjAcT9PuPtP8IHydQPkuz3xJPsGT7mbXLpS7onmLH/+Fwy1EmCc4HwpfwbrEzh26WDdrZBMvU BzeH9k1ThpeVQ/81iT9jvyGZlkraWcdW7eOKkB2KDF9IRFJ7uYpCSmDpVi+rbvLMIJQdpVtK58F6Y CNK6cIuw==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8MOc-00H97I-4c; Mon, 04 Jul 2022 13:45:59 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2F4FD30033D; Mon, 4 Jul 2022 15:45:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1947D20294871; Mon, 4 Jul 2022 15:45:48 +0200 (CEST) Date: Mon, 4 Jul 2022 15:45:48 +0200 From: Peter Zijlstra To: Guo Ren Cc: Palmer Dabbelt , Arnd Bergmann , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-riscv , linux-arch , Linux Kernel Mailing List , Guo Ren Subject: Re: [PATCH V7 4/5] asm-generic: spinlock: Add combo spinlock (ticket & queued) Message-ID: References: <20220628081707.1997728-1-guoren@kernel.org> <20220628081707.1997728-5-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 04, 2022 at 09:13:40PM +0800, Guo Ren wrote: > > Urggghhhh.... > > > > I really don't think you want this in generic code. Also, I'm thinking > > any arch that does this wants to make sure it doesn't inline any of this > Your advice is the same with Arnd, I would move static_branch out of generic. > > > stuff. That is, said arch must not have ARCH_INLINE_SPIN_* > What do you mean? I've tested with ARCH_INLINE_SPIN_* and it's okay > with EXPORT_SYMBOL(use_qspinlock_key). Well, with the static_branch and the two paths I just don't see the code being sane/small enough to inline. I mean, sure, you can force it to inline the thing, but I'm not sure that's wise.