From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbcDZSLV (ORCPT ); Tue, 26 Apr 2016 14:11:21 -0400 Received: from mail.skyhub.de ([78.46.96.112]:45834 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbcDZSLU (ORCPT ); Tue, 26 Apr 2016 14:11:20 -0400 Date: Tue, 26 Apr 2016 20:11:14 +0200 From: Borislav Petkov To: Tony Luck Cc: linux-kernel@vger.kernel.org, Ashok Raj Subject: Re: [PATCHv3] x86/mce: Look in genpool instead of mcelog.entry[] for pending error records Message-ID: <20160426181114.GH17845@pd.tnic> References: <20160407170326.GK3735@pd.tnic> <0a9f1fc6b1626ad2b9cb6f1a7c621249b39d1a63.1460058327.git.tony.luck@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0a9f1fc6b1626ad2b9cb6f1a7c621249b39d1a63.1460058327.git.tony.luck@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 08, 2016 at 10:00:50AM -0700, Tony Luck wrote: > Couple of issues here: > 1) MCE_LOG_LEN is only 32 - so we may have more pending records than will > fit in the buffer on high core count cpus > 2) During a panic we may have a lot of duplicate records because multiple > logical cpus may have seen and logged the same error because some > banks are shared. > > Switch to using the genpool to look for the pending records. Squeeze > out duplicated records. > > Signed-off-by: Tony Luck > --- > v3: Make mce_cmp() behave like other *cmp() functions: return 0 for equality (Boris) > > v2: Better names and code layout (Boris) > Revised commments on mce record comparisons (Ashok) > > arch/x86/kernel/cpu/mcheck/mce-genpool.c | 46 +++++++++++++++++++++++++++++++ > arch/x86/kernel/cpu/mcheck/mce-internal.h | 15 ++++++++++ > arch/x86/kernel/cpu/mcheck/mce.c | 21 ++++++-------- > 3 files changed, 70 insertions(+), 12 deletions(-) Applied, thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.