Messages in this thread | | | From | Brian Norris <> | Date | Wed, 3 Apr 2019 10:55:22 -0700 | Subject | Re: [PATCH v2] platform/chrome: cros_ec_spi: Transfer messages at high priority |
| |
On Wed, Apr 3, 2019 at 10:49 AM Doug Anderson <dianders@chromium.org> wrote: > On Wed, Apr 3, 2019 at 10:04 AM Brian Norris <briannorris@chromium.org> wrote: > > Does anybody know what the definition of "too long" is for the phrase > > "Don't queue works which can run for too long" in the documentation? ... > So I think the summary is that I'm back to being convinced that the > "system_highpri_wq" should be OK.
Makes sense.
> > > + wait_for_completion(¶ms.completion); > > > > I think flush_workqueue() was discussed and rejected, but what about > > flush_work()? Then you don't have to worry about the rest of the > > contents of the workqueue -- just your own work--and I think you could > > avoid the 'completion'. ... > Thanks, I'll do that in v3 assuming someone doesn't convince me to > switch back to a private workqueue.
You can do flush_work() in either case :) Then, if for some reason you start queueing up other work on your private workqueue, you still won't have to worry about inter-'work' dependencies.
Brian
| |