Skip to contentSkip to conversation

do we still need ->is_dirty_writeback

DISCUSSION Christoph Hellwig 2 participants 2 messages May 18, 2018 – May 21, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi Mel,

you added the is_dirty_writeback callback a couple years ago mostly to work around the crazy ext3 writeback code, which is long gone now. We still use buffer_check_dirty_writeback on the block device, but without that ext3 case we really should not need it anymore.

That leaves NFS, where I don't understand why it doesn't simply use PageWrite?

#1 lore raw
Quoted 9 lines · Christoph Hellwig

Hi Mel,

you added the is_dirty_writeback callback a couple years ago mostly to work around the crazy ext3 writeback code, which is long gone now. We still use buffer_check_dirty_writeback on the block device, but without that ext3 case we really should not need it anymore.

That leaves NFS, where I don't understand why it doesn't simply use PageWrite?

If you mean PageWriteback the patch was to treat some pages as if they were under writeback even if the page state didn't reflect that. The intent was to catch the case when kswapd was scanning that it would not prematurely skip over pages under writeback or were really dirty from being skipped and clean pages being reclaimed instead. In an extreme case, it would avoid a premature OOM if the number of clean pages that could be reclaimed was too small. However, it was (is?) a corner case and the mechanisms that control throttling have changed a lot since.

If the callback is problematic for some reason, I don't object to it being removed. At worst, there will be rare cases where reclaim finds clean pages and steals them prematurely. There are plenty of other cases where page age inversion issues exist (e.g. NUMA machines that reclaim young pages from local node when the working set is larger than a node) and it's rare that people notice.

Signature · 2 lines
Mel Gorman
SUSE Labs