Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1147687pxb; Thu, 7 Oct 2021 01:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz75l0If/FM4+SX08rna47hTKrl1MgDjfWibLs7usPG5tkWP7gOAgf4Qzw2Bs63pkgQrVFb X-Received: by 2002:a63:ea58:: with SMTP id l24mr2399065pgk.334.1633595877042; Thu, 07 Oct 2021 01:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633595877; cv=none; d=google.com; s=arc-20160816; b=H600niTdQ051V6UqR3q9BXOLDuGQ2/WNSIKb4pHjRrQQqRqu9lJFayYoXx2zPEWnY/ 4YWDIJkRve3RV1Qit1PtNtZ3jNo6cln6gT936IaD74s9UeSO+SYR2tS9M4ABMg8wOoGB FHUYLH4sD/pgWjcRhX2Kuj+65PUn9Rj2sMm7Mhoc62LZ8kL3N0OgR/CGeSeK5bvbx57Y bz/PYgeGNcNptmkzieHyoOScL5uG7MhCbyQAZQj95pdrobMIWGVcXQXNS/5i37sgX//1 hrVXXXBvXTrMPWOgccECjyz4p7NVAsDcv7n0wSxgyw62UwS7QswvCs/CeV0VUmcejfRB ON8g== 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=/APldPBQ17CmqUOfIAZdcACbDhylN2sZo3m6qBO+mCE=; b=Of1tmXixILilwZmfx0+XU3IsQMwYLXF9YAc+T8GUpLO3/4tU+YsYBwpy1B+GLZRa7P HBlEVJl9iYNcWR/ahVPTQFcdPFoTgTHJbZjL3l+FzbZyl2f0HJ0P50XNkFCZlmHpa71G MbKQSnvYE7NSoqC+EMg2nF8++L1niJSQHB/yQIj6HH1liRoVfjwVWcM11JxbZz+JEnAi 8RiqNl+9Qj4auoKtR0MsQUetlSM8H6L7PxlcHTxyiAxcyiZ0kYe8X69vwlx0DEd9yPue IJ8te1xaIl/bEg4BQo0JWdBRlLRxxE3k321EFIAuUT1FOzRgbFBGbDg07wrFqigYpKVe Ax/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=aTL8cjux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mt18si7958262pjb.127.2021.10.07.01.37.43; Thu, 07 Oct 2021 01:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=aTL8cjux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240355AbhJGHbS (ORCPT + 99 others); Thu, 7 Oct 2021 03:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232512AbhJGHbS (ORCPT ); Thu, 7 Oct 2021 03:31:18 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08390C061746 for ; Thu, 7 Oct 2021 00:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=/APldPBQ17CmqUOfIAZdcACbDhylN2sZo3m6qBO+mCE=; b=aTL8cjuxdwsRzemvmb1sTITpzA Uet9GqGQWn9Shbbx+uGiV7eJYL94YaDJ7Q2OYHhLy3V9G3+LPzbnLfAdV3Tyakqz00iwbb/127HU2 DcCgqLKBqbGV6Y2dgSQizrfrD3dhshwFRplqRjDInG/br85l7oZMyT8l7GSXVzrK4KpvhsM+k+Ma+ x/l4QadUR8XMve236vhfpGgHLY/RtWiBJsy+QWqY+YSU8Gt/KDc5AJi9xvJXIRNdoL9lIYwsBaG2a Q33C/2lt5Fva/vUKQrhTZ3YazXGxaJtJOsjlFFTdZ4Z7SOObrYsxF7sznmqW5Y+KxscOTW8zNTmdH siadGz1g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYNq9-008Qtj-Nu; Thu, 07 Oct 2021 07:29:17 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 63B6C98623A; Thu, 7 Oct 2021 09:29:17 +0200 (CEST) Date: Thu, 7 Oct 2021 09:29:17 +0200 From: Peter Zijlstra To: Eric Dumazet Cc: Thomas Gleixner , linux-kernel , Eric Dumazet , Dave Hansen , Borislav Petkov Subject: Re: [PATCH] x86/apic: reduce cache line misses in __x2apic_send_IPI_mask() Message-ID: <20211007072917.GN174703@worktop.programming.kicks-ass.net> References: <20211007031756.345269-1-eric.dumazet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211007031756.345269-1-eric.dumazet@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 06, 2021 at 08:17:56PM -0700, Eric Dumazet wrote: > +/* __x2apic_send_IPI_mask() possibly needs to read > + * x86_cpu_to_logical_apicid for all online cpus in a sequential way. > + * Using per cpu variable would cost one cache line per cpu. > + */ Broken comment style.. > +static u32 x86_cpu_to_logical_apicid[NR_CPUS] __read_mostly; NR_CPUS is really sad, could this at all be dynamically allocated? Say in x2apic_cluster_probe() ? Otherwise this looks very nice!