Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532AbbGWVzd (ORCPT ); Thu, 23 Jul 2015 17:55:33 -0400 Received: from catern.com ([104.131.201.120]:43928 "EHLO mail.catern.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754080AbbGWVza (ORCPT ); Thu, 23 Jul 2015 17:55:30 -0400 From: Spencer Baugh To: Bjorn Helgaas , Yijing Wang , Joern Engel , linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Cc: Joern Engel , Spencer Baugh , Spencer Baugh Subject: [PATCH] aer: add cond_resched to aer_isr Date: Thu, 23 Jul 2015 14:54:32 -0700 Message-Id: <1437688476-3399-2-git-send-email-sbaugh@catern.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 36 From: Joern Engel Multiple nested loops. I have observed 590ms scheduler latency caused by this loop and interrupts. Interrupts were responsible for 190ms, the rest could have been avoided with a cond_resched. Signed-off-by: Joern Engel Signed-off-by: Spencer Baugh --- drivers/pci/pcie/aer/aerdrv_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 9803e3d..32b1b5c 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -780,8 +780,10 @@ void aer_isr(struct work_struct *work) struct aer_err_source uninitialized_var(e_src); mutex_lock(&rpc->rpc_mutex); - while (get_e_source(rpc, &e_src)) + while (get_e_source(rpc, &e_src)) { aer_isr_one_error(p_device, &e_src); + cond_resched(); + } mutex_unlock(&rpc->rpc_mutex); wake_up(&rpc->wait_release); -- 2.5.0.rc3 -- 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/