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 EC3BEC433EF for ; Tue, 5 Jul 2022 17:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbiGERJ1 (ORCPT ); Tue, 5 Jul 2022 13:09:27 -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> 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?