Commit 870e04ae authored by Lijun Pan's avatar Lijun Pan Committed by David S. Miller

ibmvnic: queue reset work in system_long_wq

The reset process for ibmvnic commonly takes multiple seconds, clearly
making it inappropriate for schedule_work/system_wq. The reason to make
this change is that ibmvnic's use of the default system-wide workqueue
for a relatively long-running work item can negatively affect other
workqueue users. So, queue the relatively slow reset job to the
system_long_wq.
Suggested-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: default avatarLijun Pan <lijunp213@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fb434bc
...@@ -2292,8 +2292,9 @@ static void __ibmvnic_reset(struct work_struct *work) ...@@ -2292,8 +2292,9 @@ static void __ibmvnic_reset(struct work_struct *work)
adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset); adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset);
if (test_and_set_bit_lock(0, &adapter->resetting)) { if (test_and_set_bit_lock(0, &adapter->resetting)) {
schedule_delayed_work(&adapter->ibmvnic_delayed_reset, queue_delayed_work(system_long_wq,
IBMVNIC_RESET_DELAY); &adapter->ibmvnic_delayed_reset,
IBMVNIC_RESET_DELAY);
return; return;
} }
...@@ -2437,7 +2438,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter, ...@@ -2437,7 +2438,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
list_add_tail(&rwi->list, &adapter->rwi_list); list_add_tail(&rwi->list, &adapter->rwi_list);
netdev_dbg(adapter->netdev, "Scheduling reset (reason %s)\n", netdev_dbg(adapter->netdev, "Scheduling reset (reason %s)\n",
reset_reason_to_string(reason)); reset_reason_to_string(reason));
schedule_work(&adapter->ibmvnic_reset); queue_work(system_long_wq, &adapter->ibmvnic_reset);
ret = 0; ret = 0;
err: err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment