From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753744AbbIXTWc (ORCPT ); Thu, 24 Sep 2015 15:22:32 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40905 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbbIXTW2 (ORCPT ); Thu, 24 Sep 2015 15:22:28 -0400 Date: Thu, 24 Sep 2015 21:22:24 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: "Raj, Ashok" , "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: <20150924192224.GL3774@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F32B014D3@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 On Thu, Sep 24, 2015 at 07:00:46PM +0000, Luck, Tony wrote: > > If we get new ones logged in the meantime and userspace hasn't managed > > to consume and delete the present ones yet, we overwrite the oldest ones > > and set MCE_OVERFLOW like mce_log does now for mcelog. And that's no > > difference in functionality than what we have now. > > Ummmm. No. > > for (;;) { > > /* > * When the buffer fills up discard new entries. > * Assume that the earlier errors are the more > * interesting ones: > */ > if (entry >= MCE_LOG_LEN) { > set_bit(MCE_OVERFLOW, > (unsigned long *)&mcelog.flags); > return; > } Ah, we return. But we shouldn't return - we should overwrite. I believe we've talked about the policy of overwriting old errors with new ones. TBH, I don't think there's a 100%-correct policy to act according to when our error logging buffers are full: - we can overwrite old errors with new but then this way we might lose the one important error record with which it all started. - if we don't overwrite, we might fill up with "unimportant" correctable error records and miss other, more important ones which happen now - ... We could try to implement some cheap heuristics which decide what and when to overwrite but I'm sceptical it'll be always correct... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.