Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbbDAHqG (ORCPT ); Wed, 1 Apr 2015 03:46:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58462 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbbDAHp7 (ORCPT ); Wed, 1 Apr 2015 03:45:59 -0400 Date: Wed, 1 Apr 2015 09:45:53 +0200 (CEST) From: Jiri Kosina To: Borislav Petkov cc: linux-edac , Borislav Petkov , "Rafael J. Wysocki" , Len Brown , Tony Luck , Tomasz Nowicki , "Chen, Gong" , Wolfram Sang , Lv Zheng , Naoya Horiguchi , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Huang Ying Subject: Re: [RFC PATCH 5/5] GHES: Make NMI handler have a single reader In-Reply-To: <1427448178-20689-6-git-send-email-bp@alien8.de> Message-ID: References: <1427448178-20689-1-git-send-email-bp@alien8.de> <1427448178-20689-6-git-send-email-bp@alien8.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1302 Lines: 35 On Fri, 27 Mar 2015, Borislav Petkov wrote: > From: Jiri Kosina > > Since GHES sources are global, we theoretically need only a single CPU > reading them per NMI instead of a thundering herd of CPUs waiting on a > spinlock in NMI context for no reason at all. I originally wasn't 100% sure whether GHES sources are global (i.e. if it really doesn't matter which CPU is reading the registers), but looking at the code more it actually seems that this is really the right thing to do. Rationale: ghes_ioremap_pfn_nmi() always ioremaps() (exclusively) the page with the registers, performs apei_read() (which is ghes-source specific, but not CPU-specific) and unmaps the page again. There is nothing that would make this CPU-specific. Adding Huang Ying (the original author of the code) to confirm this. Huang? > Do that. I think this should indeed be pushed forward. It fixes horrible spinlock contention on systems which are under NMI storm (such as when perf is active) unrelated to GHES. Thanks, -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/