From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754008AbbIXVHk (ORCPT ); Thu, 24 Sep 2015 17:07:40 -0400 Received: from mail.skyhub.de ([78.46.96.112]:36063 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753669AbbIXVHg (ORCPT ); Thu, 24 Sep 2015 17:07:36 -0400 Date: Thu, 24 Sep 2015 23:07:33 +0200 From: Borislav Petkov To: "Raj, Ashok" Cc: "Luck, Tony" , "linux-kernel@vger.kernel.org" , "linux-edac@vger.kernel.org" Subject: Re: [Patch V1 1/3] x86, mce: MCE log size not enough for high core parts Message-ID: <20150924210732.GM3774@pd.tnic> References: <1443073720-3940-1-git-send-email-ashok.raj@intel.com> <20150924154722.GD3774@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F32B014AA@ORSMSX114.amr.corp.intel.com> <20150924185243.GJ3774@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F32B014D3@ORSMSX114.amr.corp.intel.com> <20150924192224.GL3774@pd.tnic> <20150924202212.GA13075@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150924202212.GA13075@linux.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 On Thu, Sep 24, 2015 at 01:22:12PM -0700, Raj, Ashok wrote: > Another reason i had a separate buffer in my earlier patch was to avoid > calling rcu() functions from the offline CPU. I had an offline discussion > with Paul McKenney he said don't do that... > > mce_gen_pool_add()->gen_pool_alloc() which calls rcu_read_lock() and such. > So it didn't seem approprite. How are you ever going to call into those from an offlined CPU?! And that's easy: if (!cpu_online(cpu)) return; > Also the function doesn't seem safe to be called in NMI context. Although That's why it is a lockless buffer - we added it *exactly* because we didn't want to call printk in an NMI context. So please expand... > MCE is different, for all intentional purposes we should treat both as same > priority. The old style log is simple and tested in those cases. > > I like everything you say below... something we could do as our next phase > of improving logging and might need more careful work to build it right. > > just like how MC banks have overwrite rules, we can possibly do something > like that if the buffer fills up. Right. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.