Re: [RFC] Simplify flush_workqueue/destroy_workqueue pattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Jan 2020, Christophe JAILLET wrote:

> Hi,
>
> According to description of 'destroy_workqueue()':
>    "Safely destroy a workqueue. All work currently pending will be done first"
>
> Looking deeper at the code, it turns out that the call chain is:
>        destroy_workqueue
>    --> drain_workqueue
>    --> flush_workqueue
>
> So, calling explicitly 'flush_workqueue()' before 'destroy_workqueue()' looks
> redundant.
>
> Using following coccinelle script spots ~90 occurrences, in ~80 files, which
> can be simplified.
>
> >>>>>>>>>>>>>>>
> @r@
> expression e;
> @@
> -    flush_workqueue(e);
>      destroy_workqueue(e);
> >>>>>>>>>>>>>>>
>
> This is way to much for me because my patch submission process is mainly
> manual.
>
> If you agree with my analysis, think that removing these redundant calls is
> useful and have a much more automated patch submission process than me (or
> just have time :), please feel free to submit patches.

The Coccinelle distriubution contains a program splitpatch (make
splitpatch in the tools subdirectory) that can be used for cutting up
patches and sending them to their various maintainers.  There is a file
tools/README.splitpatch that explains how to use it (although I am not
sure that this README is completely up to date...).

julia

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux