From patchwork Wed Aug 21 06:34:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2847483 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4136CBF546 for ; Wed, 21 Aug 2013 06:34:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67D6C2042B for ; Wed, 21 Aug 2013 06:34:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8828220424 for ; Wed, 21 Aug 2013 06:34:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752319Ab3HUGeZ (ORCPT ); Wed, 21 Aug 2013 02:34:25 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:44164 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295Ab3HUGeX (ORCPT ); Wed, 21 Aug 2013 02:34:23 -0400 X-AuditID: 83cfa826-b7f408e000003a47-c9-52145f6dc69f Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 3F.7B.14919.D6F54125; Wed, 21 Aug 2013 09:34:21 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Wed, 21 Aug 2013 09:34:21 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH 3/3] ath10k: fix issues on non-preemptible systems Date: Wed, 21 Aug 2013 08:34:14 +0200 Message-ID: <1377066854-13981-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377066854-13981-1-git-send-email-michal.kazior@tieto.com> References: <1377066854-13981-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGIsWRmVeSWpSXmKPExsXSfL5DSTc3XiTIYMt7HYtHl44xW7xZcYfd 4tvWB2wOzB6fZ95l89i8pN7j8ya5AOYoLpuU1JzMstQifbsErowJ59eyFyzgr/izbBFjA+NT ni5GTg4JAROJ3ilPmSBsMYkL99azgdhCAqsYJb6eU4SwlzJKvL0VDmKzCehKvGo8ywpiiwgo SPya9BGsnlnAV+LZk2VAczg4hAWcJLrPuICEWQRUJX4+OgNWwivgLrH45Ro2kBIJoNY5k2xA wpwCHhJrdvxigdjkLnFm3hImiHJBiZMzn7BATJeQOPjiBTNEjYrEwfX7mScwCsxCUjYLSdkC RqZVjPypSUkGZnolmakl+XrJ+bmbGMHBt0JtB+OzB1KHGAU4GJV4eC8oiwQJsSaWFVfmHmKU 5GBSEuU9HgsU4kvKT6nMSCzOiC8qzUktPsQowcGsJMJrDZLjTUmsrEotyodJSXOwKInzsj9l DhISSE8sSc1OTS1ILYLJynBwKEnwhsYBNQoWpaanVqRl5pQgpJk4OEGG8wANbwOp4S0uSMwt zkyHyJ9iVJQS5zUCSQiAJDJK8+B6YcnhFaM40CvCvBogVTzAxALX/QpoMBPQ4NkaQiCDSxIR UlINjK5G3hdvvtky69H2RtH92f6LmGxvMJ5uPMop3VA9Y6ac5BH5Xf8EtfUUAvduncm2zdR9 ysNtR2pu91QYVK91j/9yd6/Qo+3xh0TePZaz41sYfilCd07KATYtW2c1HzvLJNXYprjPnmUz ZxYmpOiuCBKuvTtBYq0c9xe999tjTXK5U89Grfd5psRSnJFoqMVcVJwIAGQlul/pAgAA Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Workers may not call into a sleepable function (e.g. mutex_lock). Since ath10k workers can run for a very long time it is necessary to explicitly allow process rescheduling in case there's no preemption. This fixes some issues with system freezes, hangs, watchdogs being triggered, userspace being unresponsive on slow host machines under heavy load. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/htc.c | 4 ++++ drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++++ drivers/net/wireless/ath/ath10k/wmi.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 7d445d3..99f1dbd 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -237,6 +237,10 @@ static void ath10k_htc_send_work(struct work_struct *work) ret = ath10k_htc_issue_skb(htc, ep, skb, credits); if (ret == -ENOSR) break; + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } } diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 6cf4d95..80ea398 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1229,6 +1229,10 @@ static void ath10k_htt_rx_work(struct work_struct *work) break; ath10k_htt_rx_process_skb(htt->ar, skb); + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } } diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 32fd5e7..f36f0be 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -1155,6 +1155,10 @@ static void ath10k_wmi_event_work(struct work_struct *work) break; ath10k_wmi_event_process(ar, skb); + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } }