Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3620407rwb; Sun, 7 Aug 2022 03:51:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR6M/YZwaDNX1GteQFxHTFzkob+kRrMpdzsSOwN9o6u65FGTg/qafhS4HIXJToyXlmXjAM47 X-Received: by 2002:a17:906:7304:b0:730:c3a8:cd7a with SMTP id di4-20020a170906730400b00730c3a8cd7amr10099501ejc.575.1659869510064; Sun, 07 Aug 2022 03:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659869510; cv=none; d=google.com; s=arc-20160816; b=XqTLsaxAYuR+SBPOk4KXDqoxqIXtOZj/MKdaVBxl58TdWgvf7MVhuGHNWf64K3KHhl IeBoaxSBFaIBE7SXhrXcKR7icCtWNjzigK93ZuVGJ5pDqRGZsCl1jqlSCjEifjbibWPk 5OrbzUTqOLka0H9O75MwSGRDvJrztU5LNxSVMx98fhLKcfulF+YRft7QGX+flq75KMOQ 6k/gwUnwAMP26P4gwNR2pS6fRKpxBJ0vKIug250c86UOdYj19Z0G7wvRiPDoOC3gZmwA 3lPIB+ToRgF8es0IouOAt70ERJtGFq8r2EHapQdl6FD9NvEmJomRMVu7IwwpRMnjr9yW yo0g== 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=x40mTpY8kEzZK9RIpDoiod2RNGxSlX29HilwwoJYUnQ=; b=Jgp8GITuqNOqqJSluhG4bA7jTvffigprDqs9vOwRhUEt+yARSJsimL34YqszZylicV HuBbKH/qDfGG5QKcRImGbja62QzZSI5ldBKgQ8rZZzysXELCSVsJYMRkxHUAR1XsXfmS 58i/8z1kxa0PTEDFwGoxsU6uz6kEzV6ihb4XfXN7ZG0NQVe2KpoLa8w/8gnWNwCl9/fh SNQiD4unFTOEuXuprMbAaIMGYdlN1IlXD2ZuAPPJbCkwdQBov8JrHKxOdwb3s50nzsTy V5HqUtcousALvLm9L93nvlpgF0Cv5HxfghK+exdmjMRkCfQI0X694+dpdremE1Tc3LeH zApw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=T6DjGJjY; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr18-20020a1709073f9200b00730638d91a7si8362250ejc.405.2022.08.07.03.51.24; Sun, 07 Aug 2022 03:51:50 -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=@alien8.de header.s=dkim header.b=T6DjGJjY; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbiHGKfS (ORCPT + 99 others); Sun, 7 Aug 2022 06:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232773AbiHGKfR (ORCPT ); Sun, 7 Aug 2022 06:35:17 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DFD1329 for ; Sun, 7 Aug 2022 03:35:14 -0700 (PDT) Received: from zn.tnic (p200300ea971b985f329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:985f:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8D5A21EC03B9; Sun, 7 Aug 2022 12:35:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1659868509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=x40mTpY8kEzZK9RIpDoiod2RNGxSlX29HilwwoJYUnQ=; b=T6DjGJjY1RFDQR3/xLKAKoIbOXmc74LmSddFpIKwnF3ODqcdMP06ANmfV75CiSbHDJ92un Xh0BtGnjZUUoyUpNhoq9Zuuh3SvArZ/h70EhnyAP4uZAUTzhphMAhKPG6dMaRJ2oVDQD0D KUvYt2ZmwRDOS+Qz6LOrPDOcSg2b0Us= Date: Sun, 7 Aug 2022 12:35:03 +0200 From: Borislav Petkov To: Ingo Molnar 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=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 Sun, Aug 07, 2022 at 12:02:41PM +0200, Ingo Molnar wrote: > * Borislav Petkov wrote: > > 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 Not early - more correct. We can say which CPU executed the exception handler *exactly*. Not which CPU executed the exception handler *maybe*. > us 2 instructions in the exception fast path 2 insns? They don't matter at all. FWIW, they'll pull in the per-CPU cacheline earlier which should be a net win later, for code which does smp_processor_id(). > - while in 99.999999999% of the cases we don't use that field at all ... See my text above about the ever-increasing complexity of CPU topology. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette