Received: by 10.223.164.202 with SMTP id h10csp994846wrb; Tue, 7 Nov 2017 19:20:49 -0800 (PST) X-Google-Smtp-Source: ABhQp+SoFq5NERGuZdgUgpvZBXjxEG+sI9VugZFThhecgkHnIZTsfDvuVQZDViDjvjDeZBEOwwFG X-Received: by 10.98.76.206 with SMTP id e75mr935503pfj.57.1510111249250; Tue, 07 Nov 2017 19:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510111249; cv=none; d=google.com; s=arc-20160816; b=byE0yclz02HlQPSU4sUDor8qtPVs7yuPWtAXZdJ3bM8TE2ozuqrpXVgRm/z9id9dNg 5E2WHaAdFHIo8QKKYAh1y29ABBMNpJMOR773k5SUsKJP9AekFfKhLWG1P8OSIptOGD2f 2XxWDf9wd64SZLVLh/OFCYrHBIL2SapCn9kWfy3matkxP99Czf0wgGd6qh2CCoFjPVzN T8XaTlgsonQ2JakW/SM+UjsI8H39FtOgzGUs/O8Irm3X0SsMb67l7GmBH3szqA2zJy90 3L39tjiXfyVScZ887UAooCLXL8nfkTzjsYbfg4Nn9hVbCvZSOgCBKJvYR9kvmlHJicd3 49Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=940pdB6l5+7oSu+ZAaJZd3qhIEMjNfEjQoHuG4+Ndiw=; b=KWjtdcpjDSvJew8PeFFJTE5RcPfMlFmvCZmSmPjDB1r5AfF5Za8XwF2zdhFsS2QVB/ xCxoS5KTjYA+RFO2Gdd5NKEGJyUK7zWkvcaLc80nnIBm+LW+XM+sObbFo0lckNbGX1HK VvyZ+7apkXLjQOwjH1YJYXs9IS4CDf8DmaULopphroA6he7RSuYIIxeSkoNESk/6Uk17 jZzTFieFa6miWjykEpKtoYyiLdCDGDUTka7f7MhklSdSGccVUybyiLu7RiBfhRyFYKtc v1yOGh4U6eBhxfkdz2XC+bwFx9d+fc9aPHNw3wvtHqyxXwgAyX44xmDciCyXW59BDM1e cdRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XeFcU0gG; dkim=pass header.i=@codeaurora.org header.s=default header.b=kH9FRbGJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si2607372ple.592.2017.11.07.19.20.36; Tue, 07 Nov 2017 19:20:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XeFcU0gG; dkim=pass header.i=@codeaurora.org header.s=default header.b=kH9FRbGJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757777AbdKGX1I (ORCPT + 90 others); Tue, 7 Nov 2017 18:27:08 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42630 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbdKGX1G (ORCPT ); Tue, 7 Nov 2017 18:27:06 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5772F60730; Tue, 7 Nov 2017 23:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510097226; bh=YixPex7jtV0+oa9Vx1uAdqHVpSpvUHzoBmUxL7QUH+0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XeFcU0gG6TuIjoHI/Y7auV1zERYzP4oPiul8nwo+pAnk4Kbovwy+4sgvBqTqGrpCh S+fXlwLS2T5nJWCGAfxpRf9cimQC/i3v9Gb+FJQ13LegOGMCv0i8yAm97BxuG3t9/D +pJbh8WTcEjwCxtrAhNi8auGDae5x2uBR0XVxTUg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.194] (unknown [136.56.42.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A4CE06021C; Tue, 7 Nov 2017 23:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510097225; bh=YixPex7jtV0+oa9Vx1uAdqHVpSpvUHzoBmUxL7QUH+0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=kH9FRbGJ5DzYz7HwhekHgYSIALhtcnzGuLO4MozxbqdJ27hLNIC6e8JiGYGIrD7Gk r7/DsChEr0P2R8+Ud1fmD37h9aUilk/fWQFmiEMF24n7lwdLSQE1tBU9ivfGb/ZQ70 rQggKfb1vmCUGL58rjo+uUNX3BRRU6n2AHvJHJC0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A4CE06021C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org Subject: Re: [PATCH] PCI/AER: don't call recovery process for correctable errors To: Bjorn Helgaas Cc: bhelgaas@google.com, jonathan.derrick@intel.com, keith.busch@intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <1503940184-29423-1-git-send-email-tbaicar@codeaurora.org> <20171002231903.GE5407@bhelgaas-glaptop.roam.corp.google.com> <20171011170946.GI25517@bhelgaas-glaptop.roam.corp.google.com> From: Tyler Baicar Message-ID: Date: Tue, 7 Nov 2017 18:27:03 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171011170946.GI25517@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/2017 1:09 PM, Bjorn Helgaas wrote: > On Wed, Oct 11, 2017 at 10:37:47AM -0400, Tyler Baicar wrote: >> On 10/2/2017 7:19 PM, Bjorn Helgaas wrote: >>> On Mon, Aug 28, 2017 at 11:09:44AM -0600, Tyler Baicar wrote: >>>> Correctable errors do not need any software intervention, so >>>> avoid calling into the software recovery process for correctable >>>> errors. >>>> >>>> Signed-off-by: Tyler Baicar >>>> --- >>>> drivers/pci/pcie/aer/aerdrv_core.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c >>>> index b1303b3..4765c11 100644 >>>> --- a/drivers/pci/pcie/aer/aerdrv_core.c >>>> +++ b/drivers/pci/pcie/aer/aerdrv_core.c >>>> @@ -626,7 +626,8 @@ static void aer_recover_work_func(struct work_struct *work) >>>> continue; >>>> } >>>> cper_print_aer(pdev, entry.severity, entry.regs); >>>> - do_recovery(pdev, entry.severity); >>>> + if (entry.severity != AER_CORRECTABLE) >>>> + do_recovery(pdev, entry.severity); >>> I think this is fine, and it mirrors what is done in >>> handle_error_source(). >>> >>> But I want to converge the APEI path and the "native" AER path, so as >>> one tiny step in that direction, can you look into doing this test >>> once, e.g., move the test from handle_error_source() into >>> do_recovery(), where one test will handle both paths? >> I've looked into this and it seems there is still going to need to >> be two versions of this check. The native AER path goes through >> handle_error_source() and for correctable errors requires the write >> to PCI_ERR_COR_STATUS, but the APEI path does not require this >> write. I could move this check to the beginning of do_recovery() so >> it returns right away for correctable errors and remove the else >> line in handle_error_source() so it always calls into do_recovery(). >> That doesn't seem like a very clean solution though since then there >> are still two checks for correctable errors and now we're calling >> into do_recovery() in both cases for nothing :) > The PCI_ERR_COR_STATUS thing is part of what I see as the problem > here. IMHO, the native AER path should collect up the log registers > (and do any acknowledgement, e.g., writing PCI_ERR_COR_STATUS) > *before* entering the common path. > > In other words, the Linux code in the native part of AER should be > functionally the same as the BIOS code that implements the APEI path. > > This is a bit of restructuring in the Linux AER code. I haven't > looked enough to know how much. If it's impractical, it's > impractical. I thought this might be an opportunity for a tiny step > in that direction, but if it's not, I guess that's OK. Hello Bjorn, That restructuring doesn't look trivial to do in this patch, so do you think this patch is good for 4.15? Thanks, Tyler -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From 1580981930276887857@xxx Wed Oct 11 17:11:01 +0000 2017 X-GM-THRID: 1576995657442027352 X-Gmail-Labels: Inbox,Category Forums