From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35614C2BA15 for ; Sat, 4 Apr 2020 21:32:48 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D6C8206F5 for ; Sat, 4 Apr 2020 21:32:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D6C8206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48vqlc6V2lzDqY5 for ; Sun, 5 Apr 2020 07:32:44 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=ganeshgr@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48vcVW4FLYzDrg6 for ; Sun, 5 Apr 2020 00:05:39 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 034D4gTn059763 for ; Sat, 4 Apr 2020 09:05:35 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 306k4d7uyc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 04 Apr 2020 09:05:35 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 4 Apr 2020 14:05:13 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 4 Apr 2020 14:05:11 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 034D4Ppg49021412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 4 Apr 2020 13:04:25 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6811E11C050; Sat, 4 Apr 2020 13:05:29 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CCDF11C04A; Sat, 4 Apr 2020 13:05:26 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.75.6]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sat, 4 Apr 2020 13:05:25 +0000 (GMT) Subject: Re: [PATCH] powerpc/mce: Add MCE notification chain To: Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au References: <20200330071219.12284-1-ganeshgr@linux.ibm.com> <1585879413.ubv3w8ta2y.astroid@bobo.none> From: Ganesh Date: Sat, 4 Apr 2020 18:35:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <1585879413.ubv3w8ta2y.astroid@bobo.none> Content-Type: multipart/alternative; boundary="------------87CCF05201A858112AAEDE76" Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 20040413-0016-0000-0000-000002FE3527 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20040413-0017-0000-0000-0000336206EB Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-04_09:2020-04-03, 2020-04-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 adultscore=0 phishscore=0 impostorscore=0 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004040117 X-Mailman-Approved-At: Sun, 05 Apr 2020 07:29:55 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aneesh.kumar@linux.ibm.com, santosh@fossix.org, arbab@linux.ibm.com, mahesh@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is a multi-part message in MIME format. --------------87CCF05201A858112AAEDE76 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 4/3/20 7:38 AM, Nicholas Piggin wrote: > Ganesh Goudar's on March 30, 2020 5:12 pm: >> From: Santosh S >> >> Introduce notification chain which lets know about uncorrected memory >> errors(UE). This would help prospective users in pmem or nvdimm subsystem >> to track bad blocks for better handling of persistent memory allocations. >> >> Signed-off-by: Santosh S >> Signed-off-by: Ganesh Goudar > Do you have any such users yet? It would be good to refer to an example > user and give a brief description of what it does in its notifier. Santosh has sent a patch which uses this notification. https://patchwork.ozlabs.org/patch/1265062/ >> @@ -263,6 +277,7 @@ static void machine_process_ue_event(struct work_struct *work) >> while (__this_cpu_read(mce_ue_count) > 0) { >> index = __this_cpu_read(mce_ue_count) - 1; >> evt = this_cpu_ptr(&mce_ue_event_queue[index]); >> + blocking_notifier_call_chain(&mce_notifier_list, 0, evt); > Can we really use a blocking notifier here? I'm not sure that we can. I think we can, do you see any problem? > > Thanks, > Nick --------------87CCF05201A858112AAEDE76 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 4/3/20 7:38 AM, Nicholas Piggin wrote:
Ganesh Goudar's on March 30, 2020 5:12 pm:
From: Santosh S <santosh@fossix.org>

Introduce notification chain which lets know about uncorrected memory
errors(UE). This would help prospective users in pmem or nvdimm subsystem
to track bad blocks for better handling of persistent memory allocations.

Signed-off-by: Santosh S <santosh@fossix.org>
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Do you have any such users yet? It would be good to refer to an example 
user and give a brief description of what it does in its notifier.
Santosh has sent a patch which uses this notification.
https://patchwork.ozlabs.org/patch/1265062/

      
@@ -263,6 +277,7 @@ static void machine_process_ue_event(struct work_struct *work)
 	while (__this_cpu_read(mce_ue_count) > 0) {
 		index = __this_cpu_read(mce_ue_count) - 1;
 		evt = this_cpu_ptr(&mce_ue_event_queue[index]);
+		blocking_notifier_call_chain(&mce_notifier_list, 0, evt);
Can we really use a blocking notifier here? I'm not sure that we can.
I think we can, do you see any problem?

Thanks,
Nick

--------------87CCF05201A858112AAEDE76--