Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760034AbcJ1J5D (ORCPT ); Fri, 28 Oct 2016 05:57:03 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:53320 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759969AbcJ1J5A (ORCPT ); Fri, 28 Oct 2016 05:57:00 -0400 From: Aaron Miller To: Borislav Petkov CC: Mauro Carvalho Chehab , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] EDAC: expose per-dimm error counts in sysfs Thread-Topic: [PATCH] EDAC: expose per-dimm error counts in sysfs Thread-Index: AQHSLxd6b5ppsaaKY0ysOclt6/kBZqC8m7cA///BaACAANI9gA== Date: Fri, 28 Oct 2016 09:55:44 +0000 Message-ID: References: <20161025232551.3270769-1-aaronmiller@fb.com> <20161027180716.a5z6w2g5arco564h@pd.tnic> <2DF9D2DA-2584-4623-BC1A-69314AA80F2A@fb.com> In-Reply-To: <2DF9D2DA-2584-4623-BC1A-69314AA80F2A@fb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2601:647:4e00:6320:800e:9ae0:2e7c:4a93] x-ms-office365-filtering-correlation-id: f7811418-64dc-470d-608a-08d3ff1895cb x-microsoft-exchange-diagnostics: 1;DM5PR15MB1259;7:L8Vg6ld9C8YbQnqDLs9Bleguc8rOGDyTYtSEjvlRDBZ2/3g6zbxBqUoKdCqi2hV87mGITsNDnRe/4Jhl0PXKKvnBe6/R2QWesXS2NMH0kRdA/9jwHnyc9OUVUFHHH2uvbqJtKhNGA46wD0bmqg/26LqUAjdzJ1LLyAcW9LAQtrqVgAMeYiuMooeqS+OTl62qypOlxw3O0a5GZcXOnhSHiqsaPPGEj0yTnIR8Ms10I8xN8VVuAOl2ESdYu7BOtB1j4FKOkl3UcFaEFwbiWHmXDr7VDiU5pCQbwDeu3/MQDMu1CL/bMhXHEV2oeQAt6b4bIXSqb/FJarmh5N3dZEbTV4845tT6qa1Om+TvP+md4so=;20:ZYbqv/uDA4ZpaAskE/Gx5JM7rJCIrT10x5bON5V39lSb1XSSx1jwPBfTmGBW5OnXwYAGeZ1xBWjbLbQVMY5n4/WhrOhBELGPZIRQbOTuFX/ZRolrTfc66fZf+u2oHWPCAqw5M1IrDyxcWiO1cvezhJCTe+f2Wela5CxDd/p2Kv8= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1259; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(67672495146484); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:DM5PR15MB1259;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1259; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(377454003)(24454002)(189002)(199003)(2906002)(2950100002)(110136003)(6916009)(5660300001)(50986999)(54356999)(81156014)(8676002)(76176999)(99286002)(5002640100001)(105586002)(106116001)(68736007)(102836003)(6116002)(106356001)(81166006)(10400500002)(586003)(19580405001)(101416001)(77096005)(19580395003)(97736004)(92566002)(2900100001)(33656002)(122556002)(11100500001)(8936002)(36756003)(189998001)(4326007)(83716003)(3660700001)(87936001)(82746002)(7846002)(3280700002)(86362001)(305945005)(7736002)(104396002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1259;H:DM5PR15MB1259.namprd15.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <7818D44C97B23E4D954AF799968D7EB7@namprd15.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2016 09:55:44.5432 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1259 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-28_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u9S9v8AL014140 Content-Length: 3291 Lines: 101 Whoops, I meant only the 0th slot in each channel. On 10/27/16, 2:23 PM, "Aaron Miller" wrote: If your system is like the one I’m testing on, only the channel 0 DIMM slots are populated, and you injected an error for an unpopulated slot, for which no dimmX directory gets created. In edac_mc_sysfs.c: for (i = 0; i < mci->tot_dimms; i++) { struct dimm_info *dimm = mci->dimms[i]; /* Only expose populated DIMMs */ if (!dimm->nr_pages) continue; I can repro what you saw here: $ cd /sys/devices/system/edac/mc/mc0 $ grep . dimm*/*location dimm0/dimm_location:channel 0 slot 0 dimm3/dimm_location:channel 1 slot 0 dimm6/dimm_location:channel 2 slot 0 dimm9/dimm_location:channel 3 slot 0 $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject_channel $ echo 2 > /sys/kernel/debug/edac/mc0/fake_inject_slot $ echo 3 > /sys/kernel/debug/edac/mc0/fake_inject_count $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject $ cat ce_count 3 $ grep . dimm*/*ce_count dimm0/dimm_ce_count:0 dimm3/dimm_ce_count:0 dimm6/dimm_ce_count:0 dimm9/dimm_ce_count:0 And I get what I expect for a populated slot: $ echo 0 > /sys/kernel/debug/edac/mc0/fake_inject_slot $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject $ cat ce_count 6 $ grep . dimm*/*ce_count dimm0/dimm_ce_count:0 dimm3/dimm_ce_count:3 dimm6/dimm_ce_count:0 dimm9/dimm_ce_count:0 On 10/27/16, 11:07 AM, "Borislav Petkov" wrote: On Tue, Oct 25, 2016 at 04:25:51PM -0700, Aaron Miller wrote: <--- This patch needs a commit message. Especially as to *why* we need this. > Signed-off-by: Aaron Miller > --- > drivers/edac/edac_mc_sysfs.c | 38 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) Regardless, something's still not right yet: $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject_channel $ echo 2 > /sys/kernel/debug/edac/mc0/fake_inject_slot $ echo 3 > /sys/kernel/debug/edac/mc0/fake_inject_count ^ $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject $ grep . /sys/devices/system/edac/mc/mc0/*count /sys/devices/system/edac/mc/mc0/ce_count:3 ^ /sys/devices/system/edac/mc/mc0/ce_noinfo_count:0 /sys/devices/system/edac/mc/mc0/ue_count:0 /sys/devices/system/edac/mc/mc0/ue_noinfo_count:0 $ grep -r . /sys/devices/system/edac/mc/mc0/dimm*/* 2>/dev/null | grep ce_count /sys/devices/system/edac/mc/mc0/dimm0/dimm_ce_count:0 /sys/devices/system/edac/mc/mc0/dimm3/dimm_ce_count:0 /sys/devices/system/edac/mc/mc0/dimm6/dimm_ce_count:0 /sys/devices/system/edac/mc/mc0/dimm9/dimm_ce_count:0 ^ There should be 3 somewhere in the DIMM counters... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.