Commit 4d5957cb authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

i40e: remove WQ_UNBOUND and the task limit of our workqueue

During certain events such as a CORER, multiple devices will run a work
task to handle some cleanup. This can cause issues due to
a single-threaded workqueue which can mean that a device doesn't cleanup
in time. Prevent this by removing the single-threaded restriction on the
module workqueue. This avoids the need to add more complex yielding
logic in our service task routine. This is also similar to what other
drivers such as fm10k do.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 7c9ae7f0
...@@ -12180,12 +12180,14 @@ static int __init i40e_init_module(void) ...@@ -12180,12 +12180,14 @@ static int __init i40e_init_module(void)
i40e_driver_string, i40e_driver_version_str); i40e_driver_string, i40e_driver_version_str);
pr_info("%s: %s\n", i40e_driver_name, i40e_copyright); pr_info("%s: %s\n", i40e_driver_name, i40e_copyright);
/* we will see if single thread per module is enough for now, /* There is no need to throttle the number of active tasks because
* it can't be any worse than using the system workqueue which * each device limits its own task using a state bit for scheduling
* was already single threaded * the service task, and the device tasks do not interfere with each
* other, so we don't set a max task limit. We must set WQ_MEM_RECLAIM
* since we need to be able to guarantee forward progress even under
* memory pressure.
*/ */
i40e_wq = alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1, i40e_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, i40e_driver_name);
i40e_driver_name);
if (!i40e_wq) { if (!i40e_wq) {
pr_err("%s: Failed to create workqueue\n", i40e_driver_name); pr_err("%s: Failed to create workqueue\n", i40e_driver_name);
return -ENOMEM; return -ENOMEM;
......
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