Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp793115pxy; Wed, 5 May 2021 14:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykVzH2Ss071eZ0kp9rmiy0Pxmbh9JFnwZpApZt5jeP14jSq9/zjWn0VsoZZt8NG/Py+6S9 X-Received: by 2002:aa7:dbd3:: with SMTP id v19mr1002602edt.201.1620248986401; Wed, 05 May 2021 14:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620248986; cv=none; d=google.com; s=arc-20160816; b=gmBYg9BtCj3Q+IHhuzcahwhDYc0q7RG5aET5jeOJ0B/gzieyoK0bW9diXZCAPO1hVF 6CQZ6u7mU8mOyduylNwZPYiEodtyC5O++za47qxWs3WZe5iqnT6KLzyEDNXReLMzbrw7 a+SPfipMfNtEJOY85o7MzLv7NFiR5bQ3EDpeZDSY/lGKj5DfupGUMOw5/R1zYil+y8bM WQ4ZpSwHe9rTVXhDB3AS+Vx/PXv68IHmFJ+Y8X4kppAAELWTzqpXELXJ9BOihrWzE9Zk 7R347BPnnSb2IQL2+a2W7ifRRa6e+0O+RELpfk6rcdOBTrwfeC5vP5Uxn1C1NKbeXM8B 9cqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=HgToAWSlai+dg6ZDZ8E8wj78AP4ULaEIQiaDSPYsS0c=; b=z/8dcBahGqMqEZzqGDYRaEYeiwHJ46Da1EC1Q0a/iWk3U1LCxa9kbn3GUyK1wykM7y deVyCflR2Bw2tqC+8Q81WUJc7rFlCDav1BrWK3jX5IBTa2Hju/GYTU40A4CvnEAzcURX tyR9O+z8VLONShJXiSpZxIPRBSiMn0n+IRTsfzoFv9lm0jKiQXRMp7j2WbCG//HSLde7 pahuux2l6ZSUWrWaB6UsZFTJotw9Vf0UDwdip528eeSKRiLQUnmh/m/yVJhtePWjsyOI VjmV7rDf8mVpKt4K3u4ZxoRj0U9agEiPMNrp+UEN22O7d03ThcDOVyS6uvu/5OmgnjY0 ciQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=NI7p8Zsr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si457656edv.4.2021.05.05.14.09.23; Wed, 05 May 2021 14:09:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=NI7p8Zsr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234575AbhEEUY5 (ORCPT + 99 others); Wed, 5 May 2021 16:24:57 -0400 Received: from linux.microsoft.com ([13.77.154.182]:33416 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234291AbhEEUY5 (ORCPT ); Wed, 5 May 2021 16:24:57 -0400 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 8329320B7178; Wed, 5 May 2021 13:23:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8329320B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620246240; bh=HgToAWSlai+dg6ZDZ8E8wj78AP4ULaEIQiaDSPYsS0c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NI7p8ZsrgpQn7alrUpSeVEJYavh95ehboWTqeZQMTLPQOJGk7xzUB4Qme+rEUGhRA wSdWCzTiNJueCZKO/Z6Q3kIWR8JfSusTSTXW/A4hAPsiweloAXWpR4Acj08BXDGPR3 fe2DUw4LzR4BPa18LqhqjjdHrUGeoHlxLyjGzw7E= Date: Wed, 5 May 2021 15:23:57 -0500 From: Tyler Hicks To: Borislav Petkov , wangglei Cc: "Lei Wang (DPLAT)" , "mchehab@kernel.org" , "tony.luck@intel.com" , "james.morse@arm.com" , "rric@kernel.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hang Li , Brandon Waller Subject: Re: [EXTERNAL] Re: [PATCH] EDAC: update edac printk wrappers to use printk_ratelimited. Message-ID: <20210505202357.GC4967@sequoia> References: <20210505173027.78428-1-wangglei@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-05-05 21:45:01, Borislav Petkov wrote: > Hi Lei, > > On Wed, May 05, 2021 at 07:02:14PM +0000, Lei Wang (DPLAT) wrote: > > Hi Boris, > > first of all, please do not top-post. > > > We found a corner case in production environment that there are ~500 > > CE errors per second. The SoC otherwise functions just fine. Making > > printk ratelimited reduced CE error logging to < 20 per second. > > If you want to avoid CE logs flooding dmesg, there's a couple of things > you can do: > > 1. Use drivers/ras/cec.c > > 2. Do not load EDAC drivers at all since you don't care about the error > reports, apparently. Lei, if you don't care about the CE error messages at all, there's also an edac_mc_log_ce module parameter that can be used to quiet the message emitted from edac_ce_error(): https://www.kernel.org/doc/html/latest/admin-guide/ras.html#module-parameters > 3. Fix the CE source: replace the DIMMs, etc. > > > Though this is just one case so far, we think moving to > > printk_ratelimited could benefit broader use as well, by helping > > control the amount of kernel logging. > > No, this will make EDAC driver loading output incomplete when some of > the messages are omitted due to the ratelimiting. And no, this is not > going to happen. Boris, I agree that a more surgical approach is needed than this if Lei still needs some traces of the CE error messages in the logs. Would it be any more acceptable to add an edac_mc_printk_ratelimited() macro, which uses printk_ratelimited(), and then call that new macro from edac_ce_error()? If you still don't want those CE errors ratelimited by default, perhaps a new, non-default mode (2) could be added to the edac_mc_log_ce module parameter that uses the ratelimited variant? Tyler > > HTH. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette >