Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3594654rwb; Sun, 7 Aug 2022 03:09:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR6erW+QbOnpUJZKR75wF+H9i2daWxXNtGyQIlywdBvIdeknu1A6+d0LL8uNKqxEWk0n8eLd X-Received: by 2002:a17:90b:3a81:b0:1f7:2103:a8d6 with SMTP id om1-20020a17090b3a8100b001f72103a8d6mr7333866pjb.105.1659866978737; Sun, 07 Aug 2022 03:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659866978; cv=none; d=google.com; s=arc-20160816; b=YqP1LKuabPciBQnZk/Tm7VqNsx93elQwS5e9KTj2oX4sfNhhxs8+b3NLlLqMlX9oU/ jrMYOTUGwgQrDEeDdAPydbWEBSOPVgvf8hkxnkvfp6ElAn/GF0ToS/yr75WlCC8Lz/rs 2IuOHvReEpr8AF/H6ku1HBZN3glcGEbaMfgNDLg3wDRT7tuJ8yWx/hzkNweXKDU95RcF Mx9dYn2qaWtYIDhOnBjOr2K/UFqy4da89hXzeIcrmRfeKusDSnLlr7YAit28HJfzcZca kMvFXuUajkVZT1OayPYiG9GTnmDeJJCKoNYd9oziR7zZAEub30+8rjNoqGDU9QD0s/2b UqRQ== 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:sender:dkim-signature; bh=cOMKjLtoyfKfKLxS4Utjtr9dyLLaLulKlhk3hE0DmS0=; b=gvzatCcjBYgPA6H9rAKllv6I8nfxaukB9pBU9PQY1utRKabNiPoBEdTbS6jYHzG50R hyRTeE/tnkizIX1O+z/yBP9olOYXE3lywnxSWxGqOCp42DTCJ5RwEF7UiQKTkTMeGqSA BLSztnDDAjZKEPRS6o/4KFEhKUworxkAYGxxf0K783iSy5wI6R+XlAQKKwB+7yQAmSpv T5R63t2DfZSkTDdV5KJhPsq6kMDmotJ2ETJIFn58GkQpo45+QNvtUMzP1pT3IcGKX5fb 4oDQ8mo29D+o13d6ezZ9W9ZieE1oWFJqJ66X1XbNOsnCBIRZsz/Wq6R7dH24TrpRJv9S v2MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SvHZelym; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f28-20020a63101c000000b0041610ee2f17si7453020pgl.261.2022.08.07.03.09.25; Sun, 07 Aug 2022 03:09:38 -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=@gmail.com header.s=20210112 header.b=SvHZelym; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbiHGKCs (ORCPT + 99 others); Sun, 7 Aug 2022 06:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233517AbiHGKCq (ORCPT ); Sun, 7 Aug 2022 06:02:46 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 672A3DFD1 for ; Sun, 7 Aug 2022 03:02:45 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id b16so8222230edd.4 for ; Sun, 07 Aug 2022 03:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cOMKjLtoyfKfKLxS4Utjtr9dyLLaLulKlhk3hE0DmS0=; b=SvHZelym3M8h5d4I8LnI9IigeiJ5fxXK0h4MSizcvxM1ST7hESwq9X/OQPUu2qkP4H vgjQn3elUiZHrOZX1TFTmGh2OduAPtzz4NauDn0Odh5mqSIX9yDiGpKvqgPihtbyr0Gz GLPjhsY9NMHd7+DF7uXgX2TZ7Dh3qKyLhHbvioLHl9yl4K7jLKp0qfOnvc1V06eYhF4J HyOfta1XjxAnFFPXHtaOcYf+bT9+by60O2bcu6N5BEoEBnmeA33C5uOcJS+XNoJVcGDi DvNTI7A7TyXErT1CSmfSXgto0IULwxCXUBYLIzmxiF4KClcl2syTo1yv6Q4P7s3bAYsO Bmeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=cOMKjLtoyfKfKLxS4Utjtr9dyLLaLulKlhk3hE0DmS0=; b=Fh1iHuGoQv9dgnjMTvH/WZOktKw4mWSyWdFm6sqnzpqBMGGMvtIAV6iyLxKKh7hodc /g/pi8UT4cUCkfbk4ZW0mSto70L2Z72l+Fy6P3Sy4+cz2ryVJouRtdy6yd9YCbbZa9u7 SsNW3pQwL+FXtTs2cTTZJca60xv2YaJFxoQJH4lJaYqOvQrxSudXzjpKmAcv41KstrIm zoSOd2H/iN75icfqjGV7axdwtmFvh8cNvKzEIKCXJXvGhc3MwL4j4wORQWYMA9nHsUyx aCuleVdO5X9X/YD92Ox30ZVauqf7+5hs7dwroIBI4xqGE39vKX8+LEoaynOMtTaeeeuo bRdA== X-Gm-Message-State: ACgBeo1hGB4nCRob5z0XbX+yHhSHpiOpAilMGY6YEz483NXvzjik/Foq ilNeHcCJcC6qLkEjeSmgEJsjE8Jggyo= X-Received: by 2002:a05:6402:278d:b0:43d:cf90:c91a with SMTP id b13-20020a056402278d00b0043dcf90c91amr14049571ede.186.1659866564016; Sun, 07 Aug 2022 03:02:44 -0700 (PDT) Received: from gmail.com (195-38-112-141.pool.digikabel.hu. [195.38.112.141]) by smtp.gmail.com with ESMTPSA id os8-20020a170906af6800b0073092b543c3sm3696561ejb.141.2022.08.07.03.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 03:02:43 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 7 Aug 2022 12:02:41 +0200 From: Ingo Molnar To: Borislav Petkov Cc: Dave Hansen , ira.weiny@intel.com, Rik van Riel , x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 5/5] x86/entry: Store CPU info on exception entry Message-ID: References: <20220805173009.3128098-1-ira.weiny@intel.com> <20220805173009.3128098-6-ira.weiny@intel.com> <5d62c1d0-7425-d5bb-ecb5-1dc3b4d7d245@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 * Borislav Petkov wrote: > On Sat, Aug 06, 2022 at 11:01:06AM +0200, Ingo Molnar wrote: > > It's still 2 instructions more than what we had before, while the > > fault-time CPU number is only needed infrequently AFAICS. > > With the amount of logical cores ever increasing and how CPU packages > (nodes, L3 sharing, you name it) get more and more complex topology, > I'd say the 2 insns to show the CPU number in every exception is a good > thing to do. We can show it - I'm arguing against extracting it too early, which costs us 2 instructions in the exception fast path - while in 99.999999999% of the cases we don't use that field at all ... > Arguably, we probably should've even done it already... Yeah, so I'm not against Rik's patch that prints the CPU number - that's indeed useful and I'd like to see it merged. I'm arguing against extracting the CPU so early as to impact the exception fast path. Thanks, Ingo