]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
enic: add wq clean up budget
authorGovindarajulu Varadarajan <gvaradar@cisco.com>
Thu, 21 Dec 2017 16:12:28 +0000 (08:12 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 7 Mar 2018 04:28:22 +0000 (20:28 -0800)
In case of tx clean up, we set '-1' as budget. This means clean up until
wq is empty or till (1 << 32) pkts are cleaned. Under heavy load this
will run for long time and cause
"watchdog: BUG: soft lockup - CPU#25 stuck for 21s!" warning.

This patch sets wq clean up budget to 256.

Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 27587345
(cherry picked from commit 18feb87105c3c16dc01e6981a6aafb175679b997)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/enic_main.c

index 7b4b48546834d54373bf5a440594a450e7627c45..a30c6097eba2c615106269763d41e5fdb1eb5d5a 100644 (file)
@@ -43,6 +43,8 @@
 #define ENIC_CQ_MAX            (ENIC_WQ_MAX + ENIC_RQ_MAX)
 #define ENIC_INTR_MAX          (ENIC_CQ_MAX + 2)
 
+#define ENIC_WQ_NAPI_BUDGET    256
+
 #define ENIC_AIC_LARGE_PKT_DIFF        3
 
 struct enic_msix_entry {
index 87470b0173d8e43d7511d0d8f75c60194f47ab2e..9405ac6e50dfaa8cd69b8f5bc47e25aa917897f7 100644 (file)
@@ -1294,7 +1294,7 @@ static int enic_poll(struct napi_struct *napi, int budget)
        unsigned int cq_wq = enic_cq_wq(enic, 0);
        unsigned int intr = enic_legacy_io_intr();
        unsigned int rq_work_to_do = budget;
-       unsigned int wq_work_to_do = -1; /* no limit */
+       unsigned int wq_work_to_do = ENIC_WQ_NAPI_BUDGET;
        unsigned int  work_done, rq_work_done = 0, wq_work_done;
        int err;
 
@@ -1393,7 +1393,7 @@ static int enic_poll_msix_wq(struct napi_struct *napi, int budget)
        struct vnic_wq *wq = &enic->wq[wq_index];
        unsigned int cq;
        unsigned int intr;
-       unsigned int wq_work_to_do = -1; /* clean all desc possible */
+       unsigned int wq_work_to_do = ENIC_WQ_NAPI_BUDGET;
        unsigned int wq_work_done;
        unsigned int wq_irq;