On Wed, 9 Dec 2020 01:56:14 +0000 Vladimir Oltean wrote: > On Mon, Dec 07, 2020 at 05:09:37PM -0800, Jakub Kicinski wrote: > > > + ocelot->owq = alloc_ordered_workqueue("ocelot-owq", WQ_MEM_RECLAIM); > > > > Why MEM_RECLAIM ? > > Ok, fine, I admit, I copied it. > > After reading the documentation a bit more thoroughly, I am still as > clear about the guidelines as before. The original logic was, I am > allocating a memory area and then freeing it from the work item. So it > must be beneficial for the kernel to want to flush this workqueue during > the memory reclaim process / under memory pressure, because I am doing > no memory allocation, and I am also freeing some memory in fact. > > The thing is, there are already a lot of users of WQ_MEM_RECLAIM. Many > outside of the filesystem/block subsystems. Not sure if all of them > misuse it, or how to even tell which one constitutes a correct example > of usage for WQ_MEM_RECLAIM.
Agreed, I wasn't 100% sure either. I double checked with Tejun, he says it's only needed if the work queue is directly used in memory reclaim paths, like writing pages out to swap and such.