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 1B8E0C6FA99 for ; Tue, 7 Mar 2023 21:22:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjCGVWq (ORCPT ); Tue, 7 Mar 2023 16:22:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjCGVWo (ORCPT ); Tue, 7 Mar 2023 16:22:44 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AB949DE1A for ; Tue, 7 Mar 2023 13:22:43 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id j11so18792885lfg.13 for ; Tue, 07 Mar 2023 13:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1678224161; 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=htYShvi2AdwpLoEtnEoYaPRYtP4Z0z3zxKkxUWERHwg=; b=g1lS74dwSQiAA2/BfO46KlrmLPXyPu4CH5dOZToLu9kK0ziiX1Ql/eXC9Eh/Qqu0eA 1wdOGg2Rg/8ROYm0eky2QQMg85dwLhX9md0pBS0TkxKwyUI2N3j8NNKJQ8xfaJzeaWTp bwtlUwhcZfIbQsExXeqoWo0WAFuMAiTx5OUMk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678224161; 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=htYShvi2AdwpLoEtnEoYaPRYtP4Z0z3zxKkxUWERHwg=; b=F1R27F/IaYK2SFrmtrE8OAziqifbbSy3MVtg2n5InDnU5n/Cs5LLjPCApeeQ2/Py9b F5i7MffUGJlZ8mXCRDqow5e34oQimnHGWNAVU23g1D/OPJWoLDt96yD1yYi4jqIpVwda rxEtHzvvjLunOQ95Q0ei5PakOE0Offg1vi35njWovwgi/UT6NcsUobl00EZXvpfTniz2 zD/XXeuZopBlbe4t0SI1jsOz0GkabmpGMNRW+IMZt/DRzW2JztDXUmy6k8j08+0yKpBR LpiGGyM1IQiJLIIhWPOD3CZxyXPt62RWYnOMabrIa1eaE701nwvLzNb40TabWfecJo8N h5CQ== X-Gm-Message-State: AO0yUKWr0p6xW8i6QU1GdHv7SO8o6adu0onM+bhjizLjTFwrqO6FYMaK VDabXW2p/dLOtyLyzGS97oFv1hdrfHaOLJWdiDn0mCUT X-Google-Smtp-Source: AK7set8l0FtHO74LK3zLzRBFfozRxRdkZW2unn/4gyjkjHPB3qMM8bB2x37nv4pfCVTufOzqvnVGCA== X-Received: by 2002:a05:6512:518:b0:4df:464d:91f9 with SMTP id o24-20020a056512051800b004df464d91f9mr4139438lfb.34.1678224161516; Tue, 07 Mar 2023 13:22:41 -0800 (PST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id r9-20020ac252a9000000b004dcf20843efsm2133010lfm.239.2023.03.07.13.22.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Mar 2023 13:22:41 -0800 (PST) Received: by mail-lj1-f175.google.com with SMTP id a32so14591984ljr.9 for ; Tue, 07 Mar 2023 13:22:41 -0800 (PST) X-Received: by 2002:a17:906:a01a:b0:8f5:2e0e:6dc5 with SMTP id p26-20020a170906a01a00b008f52e0e6dc5mr8126466ejy.0.1678223686605; Tue, 07 Mar 2023 13:14:46 -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:14:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/resctrl: avoid compiler optimization in __resctrl_sched_in To: "Luck, Tony" Cc: Jakub Jelinek , Segher Boessenkool , Peter Zijlstra , Nick Desaulniers , "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:11=E2=80=AFPM Luck, Tony wro= te: > > Can you expand about part "a" ... Linux has zillions of static inline fun= ctions > 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. > > What's different about this one? See the patch I just sent out. Linux has a lot of "static inline" functions. But that's not at all what that function was. It was literally just static void __resctrl_sched_in(..) which is disgusting and very wrong. I hope that compilers then just ignored it ("It's static and not used, so I'm not generating that code"), and that header file isn't included in very many places, but it's still very wrong. Linus