Writeback fixes for NFS - V3

NeilBrown
2020-04-16T00:30:11Z

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

This is version 3 (I think) of my patches to improve NFS writeaback.

Changes:
- the code for adding legacy values to /proc/vmstat was broken.
I haven't taken the approach that Michal and Jan discussed but
a simpler (I hope) approach that just seq_puts() the lines at an
appropriate place.

- I've modified the handling of PF_LOCAL_THROTTLE - sufficiently that
I dropped Jan's reviewed-by.
Rather than invoking the same behaviour as BDI_CAP_STRICTLIMIT,
I now just use the part I needed.
So if the global threshold is not exceeded, PF_LOCAL_THROTTLE tasks
are not throttled. This is the case for normal processes, but not
when BDI_CAP_STRICTLIMIT is in effect.
If the global threshold *is* exceeded, only then to we check the
local per-bdi threshold. If that is not exceeded then
PF_LOCAL_THROTTLE again avoid any throttling. Only if both the
thresholds are exceeded are these tasks throttled.
I think this is more refletive if what we actually need.

Thanks,
NeilBrown