Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756391AbZFEI3G (ORCPT ); Fri, 5 Jun 2009 04:29:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752904AbZFEI2r (ORCPT ); Fri, 5 Jun 2009 04:28:47 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:50848 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbZFEI2q (ORCPT ); Fri, 5 Jun 2009 04:28:46 -0400 Message-ID: <4A28D738.8010202@jp.fujitsu.com> Date: Fri, 05 Jun 2009 17:28:40 +0900 From: Hidetoshi Seto User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Huang Ying CC: Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Andi Kleen , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH -v4] x86: MCE: Re-implement MCE log ring buffer as per-CPU ring buffer References: <1244085090.8361.360.camel@yhuang-dev.sh.intel.com> <4A28C2E2.4090309@jp.fujitsu.com> <1244189284.8361.514.camel@yhuang-dev.sh.intel.com> In-Reply-To: <1244189284.8361.514.camel@yhuang-dev.sh.intel.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1422 Lines: 46 Huang Ying wrote: > On Fri, 2009-06-05 at 15:01 +0800, Hidetoshi Seto wrote: >> Huang Ying wrote: >>> struct mce_log { >>> - char signature[12]; /* "MACHINECHECK" */ >>> + char signature[12]; /* "MACHINECHEC2" */ >>> unsigned len; /* = MCE_LOG_LEN */ >>> - unsigned next; >>> unsigned flags; >>> unsigned pad0; >>> - struct mce entry[MCE_LOG_LEN]; >>> + struct mce_log_cpu *mcelog_cpus; >>> }; >> What is this *mcelog_cpus to be used for? >> It seems it will point one of per-CPU buffers (maybe cpu#0's buffer) >> if I have read the following mce_log_init() correctly. > > It is mainly used by something like kdump, which can search > "MACHINECHEC2", and analyze mce_log. mcelog_cpus can help kdump find the > real mcelog storage. Hum, but it help tools only to find one of buffers, not to find all. I think it would be better help for tools if we have another signature on struct mce_log_cpu, e.g.: +struct mce_log_cpu { + char signature[**]; /* "MCE_LOG_CPU_VER_1" or so */ + __u32 cpuid; /* cpuid or extcpu, same as struct mce */ + int head; + int tail; + unsigned long flags; + struct mce entry[MCE_LOG_LEN]; +}; How about this? Thanks, H.Seto -- 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/