kernel-hacking-2024-linux-s.../fs
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
..
9p 9p: read only once on O_NONBLOCK 2020-03-27 09:29:56 +00:00
adfs
affs
afs Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-23 17:16:18 -07:00
autofs
befs
bfs
btrfs btrfs: use attach/detach_page_private 2020-06-02 10:59:07 -07:00
cachefiles cachefiles: Fix race between read_waiter and read_copier involving op->to_do 2020-05-08 23:01:10 +01:00
ceph ceph: flush release queue when handling caps for unknown inode 2020-05-27 13:03:57 +02:00
cifs cifs: fix leaked reference on requeued write 2020-05-14 17:47:01 -05:00
coda
configfs configfs: fix config_item refcnt leak in configfs_rmdir() 2020-04-27 08:17:10 +02:00
cramfs
crypto fscrypt updates for 5.8 2020-06-01 12:10:17 -07:00
debugfs debugfs: remove return value of debugfs_create_u32() 2020-04-17 17:08:50 +02:00
devpts
dlm
ecryptfs ecryptfs: use crypto_shash_tfm_digest() 2020-05-08 15:32:15 +10:00
efivarfs
efs
erofs erofs: convert compressed files from readpages to readahead 2020-06-02 10:59:07 -07:00
exfat fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
exportfs
ext2 fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
ext4 ext4: pass the inode to ext4_mpage_readpages 2020-06-02 10:59:07 -07:00
f2fs f2fs: use attach/detach_page_private 2020-06-02 10:59:07 -07:00
fat fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
freevxfs
fscache
fuse fuse: convert from readpages to readahead 2020-06-02 10:59:07 -07:00
gfs2 fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
hfs
hfsplus hfsplus: fix crash and filesystem corruption when deleting files 2020-04-10 15:36:20 -07:00
hostfs hostfs: Use kasprintf() instead of fixed buffer formatting 2020-03-29 23:23:00 +02:00
hpfs fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
hugetlbfs hugetlbfs: Use i_mmap_rwsem to address page fault/truncate race 2020-04-02 09:35:32 -07:00
iomap iomap: use attach/detach_page_private 2020-06-02 10:59:07 -07:00
isofs fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
jbd2
jffs2
jfs fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
kernfs
lockd
minix
nfs mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00
nfs_common
nfsd mm/writeback: replace PF_LESS_THROTTLE with PF_LOCAL_THROTTLE 2020-06-02 10:59:08 -07:00
nilfs2 fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
nls
notify fanotify: turn off support for FAN_DIR_MODIFY 2020-05-27 18:55:54 +02:00
ntfs ntfs: replace attach_page_buffers with attach_page_private 2020-06-02 10:59:07 -07:00
ocfs2 fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
omfs fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
openpromfs
orangefs orangefs: use attach/detach_page_private 2020-06-02 10:59:08 -07:00
overlayfs ovl: potential crash in ovl_fid_to_fh() 2020-05-13 11:10:57 +02:00
proc mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00
pstore pstore/blk: Introduce "best_effort" mode 2020-05-31 19:49:01 -07:00
qnx4
qnx6 fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
quota
ramfs
reiserfs fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
romfs
squashfs squashfs: migrate from ll_rw_block usage to BIO 2020-06-02 10:59:05 -07:00
sysfs sysfs: remove redundant __compat_only_sysfs_link_entry_to_kobj fn 2020-04-05 11:34:35 -07:00
sysv
tracefs
ubifs 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
udf fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
ufs
unicode .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
vboxsf vboxsf: don't use the source name in the bdi name 2020-05-07 08:45:47 -06:00
verity fs-verity: remove unnecessary extern keywords 2020-05-12 16:44:00 -07:00
xfs iomap: convert from readpages to readahead 2020-06-02 10:59:07 -07:00
zonefs iomap: convert from readpages to readahead 2020-06-02 10:59:07 -07:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() 2020-05-28 11:35:40 -07:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
buffer.c fs/buffer.c: use attach/detach_page_private 2020-06-02 10:59:07 -07:00
char_dev.c
compat.c
compat_binfmt_elf.c
coredump.c coredump: fix crash when umh is disabled 2020-04-28 17:54:13 +02:00
d_path.c
dax.c dax,iomap: Add helper dax_iomap_zero() to zero a range 2020-04-02 19:15:03 -07:00
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: call final ep_events_available() check under the lock 2020-05-14 10:00:35 -07:00
exec.c exec: Move would_dump into flush_old_exec 2020-05-17 10:48:24 -05:00
fcntl.c
fhandle.c
file.c fix multiplication overflow in copy_fdtable() 2020-05-19 18:29:36 -04:00
file_table.c vfs: track per-sb writeback errors and report them to syncfs 2020-06-02 10:59:05 -07:00
filesystems.c fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once() 2020-04-10 15:36:22 -07:00
fs-writeback.c mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00
fs_context.c
fs_parser.c fs_parse: remove pr_notice() about each validation 2020-04-02 09:35:26 -07:00
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
inode.c
internal.h Merge branch 'work.dotdot1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-04-02 12:30:08 -07:00
io-wq.c io_uring: use io-wq manager as backup task if task is exiting 2020-04-03 11:35:57 -06:00
io-wq.h io_uring: use io-wq manager as backup task if task is exiting 2020-04-03 11:35:57 -06:00
io_uring.c io_uring: reset -EBUSY error when io sq thread is waken up 2020-05-20 07:26:47 -06:00
ioctl.c fibmap: Warn and return an error in case of block > INT_MAX 2020-04-30 07:57:46 -07:00
Kconfig
Kconfig.binfmt
libfs.c libfs: fix infoleak in simple_attr_read() 2020-03-24 13:27:16 +01:00
locks.c
Makefile
mbcache.c
mount.h
mpage.c fs: convert mpage_readpages to mpage_readahead 2020-06-02 10:59:07 -07:00
namei.c fix a braino in legitimize_path() 2020-04-06 10:38:59 -04:00
namespace.c
no-block.c
nsfs.c
open.c vfs: track per-sb writeback errors and report them to syncfs 2020-06-02 10:59:05 -07:00
pipe.c mm: kmem: rename memcg_kmem_(un)charge() into memcg_kmem_(un)charge_page() 2020-04-02 09:35:28 -07:00
pnode.c propagate_one(): mnt_set_mountpoint() needs mount_lock 2020-04-27 10:37:14 -04:00
pnode.h
posix_acl.c
proc_namespace.c
read_write.c powerpc: Add back __ARCH_WANT_SYS_LLSEEK macro 2020-04-03 00:09:59 +11:00
readdir.c
select.c
seq_file.c fs/seq_file.c: seq_read(): add info message about buggy .next functions 2020-04-10 15:36:22 -07:00
signalfd.c
splice.c pipe: Fix pipe_full() test in opipe_prep(). 2020-05-20 10:54:29 -07:00
stack.c
stat.c
statfs.c
super.c Fix use after free in get_tree_bdev() 2020-04-28 14:37:40 -07:00
sync.c vfs: track per-sb writeback errors and report them to syncfs 2020-06-02 10:59:05 -07:00
timerfd.c
userfaultfd.c userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally 2020-04-07 10:43:40 -07:00
utimes.c
xattr.c xattr: fix uninitialized out-param 2020-04-09 15:33:09 -04:00