Subject: Re: [PATCH net-next] ibmvnic: queue reset work in system_long_wq

From: Nathan Lynch <[email-masked]>
Date: Tue, 13 Apr 2021 08:29:58 -0500

Hi Lijun,

Lijun Pan <[email-masked]> writes:
> When the linux system is under stress or the VIOS server is
> responding slowly, the vnic driver may hit multiple timeouts during the
> reset process. Instead of queueing the reset requests to system_wq,
> queueing the relatively slow reset job to the system_long_wq.

I think the commit message should better justify the change. I suggested
this because the reset process for ibmvnic commonly takes multiple
seconds, clearly making it inappropriate for schedule_work/system_wq:

(workqueue.h)
 * system_wq is the one used by schedule[_delayed]_work[_on]().
 * Multi-CPU multi-threaded.  There are users which expect relatively
 * short queue flush time.  Don't queue works which can run for too
 * long.
...
 * system_long_wq is similar to system_wq but may host long running
 * works.  Queue flushing might take relatively long.

If the reset process isn't completing before some kind of deadline (is
this the nature of the timeouts you mention?), changing to
system_long_wq is unlikely to help that. 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.