From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755582AbdDLVMc (ORCPT ); Wed, 12 Apr 2017 17:12:32 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:35634 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755463AbdDLVMa (ORCPT ); Wed, 12 Apr 2017 17:12:30 -0400 Date: Wed, 12 Apr 2017 23:12:21 +0200 (CEST) From: Thomas Gleixner To: Dan Williams cc: "Luck, Tony" , "Verma, Vishal L" , "bp@suse.de" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "ross.zwisler@linux.intel.com" , "x86@kernel.org" Subject: Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic' In-Reply-To: Message-ID: References: <20170411224457.24777-1-vishal.l.verma@intel.com> <20170412091442.dwonfr4dwyta7nvx@pd.tnic> <20170412195903.GA29506@omniknight.lm.intel.com> <20170412202238.5d327vmwjqvbzzop@pd.tnic> <1492028744.2738.14.camel@intel.com> <20170412205229.GA13659@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 On Wed, 12 Apr 2017, Dan Williams wrote: > On Wed, Apr 12, 2017 at 1:52 PM, Luck, Tony wrote: > > On Wed, Apr 12, 2017 at 01:27:05PM -0700, Verma, Vishal L wrote: > >> > /* We only care about memory errors */ > >> > if (!(mce->status & MCACOD)) > >> > return NOTIFY_DONE; > > > > N.B. that isn't a valid test that this is a memory error. You need > > > > > > if (!(m->status & 0xef80) == BIT(7)) > > return NOTIFY_DONE; > > > > See: Intel SDM Volume 3B - 15.9.2 Compound Error Codes > > But Vishal's point is that even if we get this check correct the > notifier still requires no sleeping operations. So we would need to > move recoverable notifications to a separate blocking notifier chain. There is another solution: Convert the notifier to a blocking notifier and in the panic case, ignore the locking and invoke the notifier chain directly. That needs some minimal surgery in the notifier code to allow that, but that's certainly less ugly than splitting stuff up into two chains. Thanks, tglx