From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936AbdKAQaj (ORCPT ); Wed, 1 Nov 2017 12:30:39 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:50188 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbdKAQah (ORCPT ); Wed, 1 Nov 2017 12:30:37 -0400 Date: Wed, 1 Nov 2017 17:30:31 +0100 (CET) From: Thomas Gleixner To: Prarit Bhargava cc: linux-kernel@vger.kernel.org, Andi Kleen , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Dave Hansen , Piotr Luc , Kan Liang , Borislav Petkov , Stephane Eranian , Arvind Yadav , Andy Lutomirski , Christian Borntraeger , "Kirill A. Shutemov" , Tom Lendacky , Mathias Krause , Tim Chen , Vitaly Kuznetsov Subject: Re: [PATCH 1/3 v4] perf/x86/intel/uncore: Cache logical pkg id in uncore driver In-Reply-To: <20171025120940.15721-2-prarit@redhat.com> Message-ID: References: <20171025120940.15721-1-prarit@redhat.com> <20171025120940.15721-2-prarit@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Oct 2017, Prarit Bhargava wrote: > From: Andi Kleen > > The SNB-EP uncore driver is the only user of topology_phys_to_logical_pkg > in a performance critical path. Change it query the logical pkg ID > only once at initialization time and then cache it in box structure. That second sentence needs some care: Avoid the lookup in the hotpath and cache the id at initialization time. This is also a prerequisite to change the underlying logical package management implementation w/o impacting this driver. Other than that. Reviewed-by: Thomas Gleixner