Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbbLDSAL (ORCPT ); Fri, 4 Dec 2015 13:00:11 -0500 Received: from mail.skyhub.de ([78.46.96.112]:59142 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbbLDSAJ (ORCPT ); Fri, 4 Dec 2015 13:00:09 -0500 Date: Fri, 4 Dec 2015 19:00:01 +0100 From: Borislav Petkov To: "Luck, Tony" Cc: "Raj, Ashok" , "linux-kernel@vger.kernel.org" , "linux-edac@vger.kernel.org" , "Andy Lutomirski (luto@amacapital.net)" Subject: Re: [Patch V0] x86, mce: Ensure offline CPU's don't participate in mce rendezvous process. Message-ID: <20151204180001.GL21177@pd.tnic> References: <1449188170-3909-1-git-send-email-ashok.raj@intel.com> <20151204143404.GF21177@pd.tnic> <20151204171419.GA4870@otc-brkl-03.jf.intel.com> <20151204165112.GI21177@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F39F78AD9@ORSMSX114.amr.corp.intel.com> <20151204173633.GK21177@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F39F78D9F@ORSMSX114.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F39F78D9F@ORSMSX114.amr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1478 Lines: 33 On Fri, Dec 04, 2015 at 05:53:33PM +0000, Luck, Tony wrote: > > I don't mean that - I mean the stuff we do before we call > > cpu_is_offline() like ist_enter, this_cpu_inc(mce_exception_count), > > etc. Then we do a whole another bunch of stuff at the "out:" label like > > printk and whatnot which shouldn't run on an offlined CPU. > > ist_enter() is black magic to me. Andy? Would you be worried about executing > ist_{enter,exit}() on a cpu that was once online, but is currently marked offline > by Linux? ist_enter() is context tracking functionality. > Bumping mce_exception_count doesn't look like a big deal either way. It is visible in > /proc/interrupts so I'd like to keep that honest (if the cpu comes back online again). > But we could do the offline check before this. > > There will be no printk() executed in the tail of the function. after we clear MCG_STATUS > at the (new location of) the out: label we will see recover_paddr is still ~0ull and "goto done". Whether it is kosher or not is beside the point. Why should an offlined CPU even noodle through all that code if it doesn't need/have to? It can return immediately instead. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- 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/