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 EBEC6C6FA99 for ; Tue, 7 Mar 2023 21:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbjCGVTa (ORCPT ); Tue, 7 Mar 2023 16:19:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231414AbjCGVT3 (ORCPT ); Tue, 7 Mar 2023 16:19:29 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50A759B9A7 for ; Tue, 7 Mar 2023 13:19:26 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id g3so57990420eda.1 for ; Tue, 07 Mar 2023 13:19:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1678223964; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lRkOZ5wI6FwGaM4HgKKUX1s/pa2xIbKjX2uXD922yeA=; b=chSxj0mpjqI9ZSrsguW7U9GOdTy4KEDIvukMgkc4YnzALeW9HrqOIacWOobYTCh3EX B6wl1EmFC72B9L33/XjxCNazJTQ23/gG8du2/WtM6iUrzM170317QdCukLyDfdwZrDss Kt+vda2NA7yyoAbWwjWP+EqCS93q0CkexZJeg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678223964; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lRkOZ5wI6FwGaM4HgKKUX1s/pa2xIbKjX2uXD922yeA=; b=V8LBEqEHA4Rc3HUerL9Puv3soHI831XTaQcxsZp/bfWtxKrjfz5AzLcV0xRpA6zon7 rU6EBNJU+eBwUB+yxz41cTvPu98QRO23wp3TBU/LuYeiHmk4T1ISj2JCvDIjNHQcBCaU Kff9XLrJi96M9GrvRLUxVDIMiUdn4J5FwIZbHz4BWUPUn8GiB+0G84bZMFm9mgzWTeld e/SBaiaylTY2dxJv8u7g2SwkfccIqFzX2S1u55lbosv7r0PObwDx+OVCGaTdow6W0US7 puQp3lHlhjuegMaOn2EPxurn/BJWDuWgjmhMu81++Rp6l+SgO0DLRBOBrusf7yaaSsPK ZQGA== X-Gm-Message-State: AO0yUKXBaSHn63L3Yfk+Qo0hJ+Kh28cgjKx92NXtinsMnflLiSLW4UvH IJeCHY/31SELy+lilV9qIXg1ynwAzkOgQaD3Bbmdq9hH X-Google-Smtp-Source: AK7set/vpXdQO4fSbHI+dXRhFe/8B8sNejr7egR6oWkZ565JiR0sY6yowWKv2SE/fJIaecv23uu2pg== X-Received: by 2002:a17:906:ee8d:b0:86f:d0c9:4bdd with SMTP id wt13-20020a170906ee8d00b0086fd0c94bddmr20232130ejb.27.1678223964180; Tue, 07 Mar 2023 13:19:24 -0800 (PST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com. [209.85.208.53]) by smtp.gmail.com with ESMTPSA id o18-20020a170906769200b008dedf1359a0sm6599523ejm.104.2023.03.07.13.19.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 13:19:23 -0800 (PST) Received: by mail-ed1-f53.google.com with SMTP id cw28so57886343edb.5 for ; Tue, 07 Mar 2023 13:19:22 -0800 (PST) X-Received: by 2002:a17:906:a01a:b0:8f5:2e0e:6dc5 with SMTP id p26-20020a170906a01a00b008f52e0e6dc5mr8132383ejy.0.1678223962342; Tue, 07 Mar 2023 13:19:22 -0800 (PST) MIME-Version: 1.0 References: <20230303231133.1486085-1-eranian@google.com> <20230306120106.GE1267364@hirez.programming.kicks-ass.net> <20230307113545.GB2017917@hirez.programming.kicks-ass.net> <20230307184315.GS25951@gate.crashing.org> In-Reply-To: From: Linus Torvalds Date: Tue, 7 Mar 2023 13:19:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/resctrl: avoid compiler optimization in __resctrl_sched_in To: Nick Desaulniers Cc: "Luck, Tony" , Jakub Jelinek , Segher Boessenkool , Peter Zijlstra , "Eranian, Stephane" , "linux-kernel@vger.kernel.org" , "Chatre, Reinette" , "Yu, Fenghua" , "peternewman@google.com" , "james.morse@arm.com" , "babu.moger@amd.com" , "ananth.narayan@amd.com" , "vschneid@redhat.com" , Nathan Chancellor , clang-built-linux , Borislav Petkov , "H. Peter Anvin" , "linux-toolchains@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Tue, Mar 7, 2023 at 1:16=E2=80=AFPM Nick Desaulniers wrote: > > > > > Can you expand about part "a" ... Linux has zillions of static inline f= unctions > > in header files to handle CONFIG options. One version is the real McCoy > > while the other is just a stub for the CONFIG=3Dn case. > > Right, I had the same question. > > Perhaps it's more so that no one calls __resctrl_sched_in, only > resctrl_sched_in, therefor they should be folded into one function? If you think it should be inlined, it should be marked as such. And if you *don't* think it should be inlined - quite possibly the right answer here - the definition of that function damn well shouldn't be in a header file. So either way, that __resctrl_sched_in() was wrong, wrong, wrong. Linus