Hello, On Fri, Aug 16, 2019 at 06:02:56PM +0200, Jan Kara wrote: > 1) You ask to writeback LONG_MAX pages. That means that you give up any > livelock avoidance for the flusher work and you can writeback almost > forever if someone is busily dirtying pages in the wb. I think you need to > pick something like amount of dirty pages in the given wb (that would have > to be fetched after everything is looked up) or just some arbitrary > reasonably small constant like 1024 (but then I guess there's no guarantee > stuck memcg will make any progress and you've invalidated the frn entry > here). I see. Yeah, I think the right thing to do would be feeding the number of dirty pages or limiting it to one full sweep. I'll look into it. > 2) When you invalidate frn entry here by writing 0 to 'at', it's likely to get > reused soon. Possibly while the writeback is still running. And then you > won't start any writeback for the new entry because of the > atomic_read(&frn->done.cnt) == 1 check. This seems like it could happen > pretty frequently? Hmm... yeah, the clearing might not make sense. I'll remove that. Thanks. -- tejun