linux-stable/drivers
NeilBrown 8d92890bd6 mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead
After an NFS page has been written it is considered "unstable" until a
COMMIT request succeeds.  If the COMMIT fails, the page will be
re-written.

These "unstable" pages are currently accounted as "reclaimable", either
in WB_RECLAIMABLE, or in NR_UNSTABLE_NFS which is included in a
'reclaimable' count.  This might have made sense when sending the COMMIT
required a separate action by the VFS/MM (e.g.  releasepage() used to
send a COMMIT).  However now that all writes generated by ->writepages()
will automatically be followed by a COMMIT (since commit 919e3bd9a8
("NFS: Ensure we commit after writeback is complete")) it makes more
sense to treat them as writeback pages.

So this patch removes NR_UNSTABLE_NFS and accounts unstable pages in
NR_WRITEBACK and WB_WRITEBACK.

A particular effect of this change is that when
wb_check_background_flush() calls wb_over_bg_threshold(), the latter
will report 'true' a lot less often as the 'unstable' pages are no
longer considered 'dirty' (as there is nothing that writeback can do
about them anyway).

Currently wb_check_background_flush() will trigger writeback to NFS even
when there are relatively few dirty pages (if there are lots of unstable
pages), this can result in small writes going to the server (10s of
Kilobytes rather than a Megabyte) which hurts throughput.  With this
patch, there are fewer writes which are each larger on average.

Where the NR_UNSTABLE_NFS count was included in statistics
virtual-files, the entry is retained, but the value is hard-coded as
zero.  static trace points and warning printks which mentioned this
counter no longer report it.

[akpm@linux-foundation.org: re-layout comment]
[akpm@linux-foundation.org: fix printk warning]
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Acked-by: Michal Hocko <mhocko@suse.com>	[mm]
Cc: Christoph Hellwig <hch@lst.de>
Cc: Chuck Lever <chuck.lever@oracle.com>
Link: http://lkml.kernel.org/r/87d06j7gqa.fsf@notabene.neil.brown.name
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-02 10:59:08 -07:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00
bcma
block mm/writeback: replace PF_LESS_THROTTLE with PF_LOCAL_THROTTLE 2020-06-02 10:59:08 -07:00
bluetooth
bus
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-06-01 12:00:10 -07:00
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-06-01 12:00:10 -07:00
dax vfs: track per-sb writeback errors and report them to syncfs 2020-06-02 10:59:05 -07:00
dca
devfreq
dio
dma
dma-buf
edac Merge branches 'edac-i10nm' and 'edac-misc' into edac-updates-for-5.8 2020-06-01 11:39:15 +02:00
eisa
extcon
firewire
firmware Printk changes for 5.8 2020-06-01 12:13:30 -07:00
fpga
fsi
gnss
gpio gpio: fix locking open drain IRQ lines 2020-05-29 14:01:49 +02:00
gpu drm fixes for 5.7 final 2020-05-29 12:32:46 -07:00
greybus
hid
hsi
hv
hwmon hwmon: Add Baikal-T1 PVT sensor driver 2020-05-28 07:59:45 -07:00
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband IB/ipoib: Fix double free of skb in case of multicast traffic in CM mode 2020-05-27 21:14:09 -03:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-05-28 12:41:11 -07:00
interconnect
iommu iommu: Fix reference count leak in iommu_group_alloc. 2020-05-29 15:27:50 +02:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md md: remove __clear_page_buffers and use attach/detach_page_private 2020-06-02 10:59:07 -07:00
media
memory
memstick
message
mfd
misc
mmc
most
mtd Fixes and new features for pstore 2020-06-01 12:07:34 -07:00
mux
net drivers/net/ibmvnic: Update VNIC protocol version reporting 2020-05-29 17:20:59 -07:00
nfc Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-06-01 12:00:10 -07:00
ntb
nubus
nvdimm
nvme nvme-pci: avoid race between nvme_reap_pending_cqes() and nvme_poll() 2020-05-27 20:32:56 +02:00
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform Fixes and new features for pstore 2020-06-01 12:07:34 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator Merge remote-tracking branch 'regulator/for-5.8' into regulator-linus 2020-06-01 13:01:44 +01:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
siox
slimbus
soc
soundwire
spi Merge remote-tracking branch 'spi/for-5.8' into spi-next 2020-05-30 00:03:53 +01:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
uio
usb
vdpa
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile