Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1497212imw; Tue, 5 Jul 2022 10:28:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1udt/nonRAsyRanGNxsrKZhaq6bUfYy4D1Sl4BBL7AreypQrqbfRWri5wG21UQWCRckFGpF X-Received: by 2002:a17:907:7210:b0:72a:b8af:aa37 with SMTP id dr16-20020a170907721000b0072ab8afaa37mr14247993ejc.481.1657042121111; Tue, 05 Jul 2022 10:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657042121; cv=none; d=google.com; s=arc-20160816; b=Yp91qMx2k8c+gFv42nIx00W+HOorjM9S3Ln3sg852vpT/Fqv9vKW+FWlHh2Nvvip5l UelEn+ZasyUy+g4T532N1vH1OBI4QL8Ya4skElE8vhjEqxG9h4HwzpQG2vnSFRNQxUpt DAA4MSy4a08QdkpXjRoPmRwnsLpJmC4zSLvst0g8p5PGvSD2uU1hC6sKhpHJyKyHgwKL U631r9npUTgtMBWCoLfw7LlMaQ90Ner0wZitFLaM4B5XnFirB4vQbkUzt9o3RYBAAVdp xuvJOcHqlzfU07/k3z3iqVtiTcQJGou3bmiWJHh0QF758vlo0V8v+sPOY7NPXP9NQkTQ fNdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LRxepLtU3tlx+iQf/9hQqxrfajocnvVd/JJZgo+pBRQ=; b=ZUHNImMKRNVIX6J50fjHvbdhI3YfipNnCKnK9uc1lhDEoB3PQxEC9/7UrHkICVr1rn baigLMaV+fU5X3THpg9EY/dau2zf/1gQQwKpNqfWB67xNsS8FiNs7/9M3wBiM5MHoYd0 ofQe97NpQneDYFt4dBSINj4G/DnTLCtiOwHnucatQKN0Izlxsp2ZMLatQQhRksyMNu2A PKSFl7UR4i7XucrvZr/LoEOjVXki2Keoj6a5W9y4X70d2LXAD4IGdHlOquScdlEaUbV/ pV+p2RiHKy8sOEMqqK3EBjbchTSLun/r4zW0CuDeP9xkIfrVVvltI1W0NwqUxfkAH9hP XbaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wRtNMblB; 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 hz4-20020a1709072ce400b0072ab0027c63si4717438ejc.455.2022.07.05.10.28.16; Tue, 05 Jul 2022 10:28:41 -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=@infradead.org header.s=casper.20170209 header.b=wRtNMblB; 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 S232288AbiGERJZ (ORCPT + 99 others); Tue, 5 Jul 2022 13:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233210AbiGERJM (ORCPT ); Tue, 5 Jul 2022 13:09:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D4F1F2C3 for ; Tue, 5 Jul 2022 10:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=LRxepLtU3tlx+iQf/9hQqxrfajocnvVd/JJZgo+pBRQ=; b=wRtNMblBRkQjskTja0WzTeVuaA tcinC5+573x/fQ1Of7EKeDKarHeuz6CdN/44SF7h8II/kjpIFMnq2FsJ4j5whtzxWIKEhI8LILBcd DJh+XzPtyVcEPOaQiUjNPa0VPpZwyxhtjlvSj89vRIeAYJM8RLz6HdeMn5h0zwLunsd1KS1B6dYIj KBu8Grxi45JPQrhm2W+/Q+3mszgefv+0yXMml47u3P9t8BkVeHvchKfBi8qXQPzRndUvq6dMnMgBk H0Sc1o/LsWuY5RlnbGZyFv8iyNsPBFNL5euZc9gY+iIGUmuR4/BDobGzb9a5n25/7AtFzUcWI6M7G I6QBShtw==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8m2f-000lWR-Ki; Tue, 05 Jul 2022 17:08:53 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 35777980059; Tue, 5 Jul 2022 19:08:53 +0200 (CEST) Date: Tue, 5 Jul 2022 19:08:53 +0200 From: Peter Zijlstra To: Nicholas Piggin Cc: Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/13] locking/qspinlock: be less clever with the preprocessor Message-ID: References: <20220704143820.3071004-1-npiggin@gmail.com> <20220704143820.3071004-6-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220704143820.3071004-6-npiggin@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Tue, Jul 05, 2022 at 12:38:12AM +1000, Nicholas Piggin wrote: > Stop qspinlock.c including itself and avoid most of the function > renaming with the preprocessor. > > This is mostly done by having the common slowpath code take a 'bool > paravirt' argument and adjusting code based on that. What does code-gen do? Is it clever enough to constant fold the lot? Should we be using __always_inline to ensure the compiler doesn't decide against inlining because $raisin and then emitting extra condtionals?