Jan Kara
0a417b8dc1
xfs: Timely free truncated dirty pages
...
Commit 99579ccec4 "xfs: skip dirty pages in ->releasepage()" started
to skip dirty pages in xfs_vm_releasepage() which also has the effect
that if a dirty page is truncated, it does not get freed by
block_invalidatepage() and is lingering in LRU list waiting for reclaim.
So a simple loop like:
while true; do
dd if=/dev/zero of=file bs=1M count=100
rm file
done
will keep using more and more memory until we hit low watermarks and
start pagecache reclaim which will eventually reclaim also the truncate
pages. Keeping these truncated (and thus never usable) pages in memory
is just a waste of memory, is unnecessarily stressing page cache
reclaim, and reportedly also leads to anonymous mmap(2) returning ENOMEM
prematurely.
So instead of just skipping dirty pages in xfs_vm_releasepage(), return
to old behavior of skipping them only if they have delalloc or unwritten
buffers and fix the spurious warnings by warning only if the page is
clean.
CC: [email protected]
CC: Brian Foster <[email protected] >
CC: Vlastimil Babka <[email protected] >
Reported-by: Petr Tůma <[email protected] >
Fixes: 99579ccec4
Signed-off-by: Jan Kara <[email protected] >
Reviewed-by: Brian Foster <[email protected] >
Signed-off-by: Darrick J. Wong <[email protected] >
2017-01-11 10:20:04 -08:00
..
libxfs
xfs: don't rely on ->total in xfs_alloc_space_available
2017-01-09 13:45:01 -08:00
Kconfig
kmem.c
kmem.h
Makefile
xfs: introduce the CoW fork
2016-10-04 18:06:40 -07:00
mrlock.h
uuid.c
uuid.h
xfs.h
xfs_acl.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2016-10-10 20:16:43 -07:00
xfs_acl.h
xfs_aops.c
xfs: Timely free truncated dirty pages
2017-01-11 10:20:04 -08:00
xfs_aops.h
xfs: use iomap_dio_rw
2016-11-30 14:37:15 +11:00
xfs_attr.h
xfs: several xattr functions can be void
2016-12-05 12:32:14 +11:00
xfs_attr_inactive.c
xfs_attr_list.c
xfs: several xattr functions can be void
2016-12-05 12:32:14 +11:00
xfs_bmap_item.c
xfs: when replaying bmap operations, don't let unlinked inodes get reaped
2016-10-04 11:05:44 -07:00
xfs_bmap_item.h
xfs: log bmap intent items
2016-10-04 11:05:44 -07:00
xfs_bmap_util.c
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_bmap_util.h
xfs_buf.c
xfs: updates for 4.10-rc1
2016-12-14 21:35:31 -08:00
xfs_buf.h
xfs: use rhashtable to track buffer cache
2016-12-07 17:36:36 +11:00
xfs_buf_item.c
xfs: normalize "infinite" retries in error configs
2016-09-14 07:51:30 +10:00
xfs_buf_item.h
xfs_dir2_readdir.c
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_discard.c
xfs_discard.h
xfs_dquot.c
xfs_dquot.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_error.c
xfs_error.h
xfs: simulate per-AG reservations being critically low
2016-10-05 16:26:31 -07:00
xfs_export.c
xfs_export.h
xfs_extent_busy.c
xfs: remote attribute blocks aren't really userdata
2016-09-26 08:21:28 +10:00
xfs_extent_busy.h
xfs_extfree_item.c
xfs: remove unnecessary parentheses from log redo item recovery functions
2016-08-03 12:29:32 +10:00
xfs_extfree_item.h
xfs_file.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2016-12-17 18:44:00 -08:00
xfs_filestream.c
Merge branch 'xfs-4.9-log-recovery-fixes' into for-next
2016-10-03 09:56:28 +11:00
xfs_filestream.h
xfs_fsops.c
xfs: use the actual AG length when reserving blocks
2017-01-03 18:39:33 -08:00
xfs_fsops.h
xfs: preallocate blocks for worst-case btree expansion
2016-10-05 16:26:27 -07:00
xfs_globals.c
xfs: garbage collect old cowextsz reservations
2016-10-05 16:26:28 -07:00
xfs_icache.c
xfs: fix crash and data corruption due to removal of busy COW extents
2017-01-03 18:39:33 -08:00
xfs_icache.h
xfs: garbage collect old cowextsz reservations
2016-10-05 16:26:28 -07:00
xfs_icreate_item.c
fs: xfs: xfs_icreate_item: constify xfs_item_ops structure
2016-11-28 14:57:42 +11:00
xfs_icreate_item.h
xfs_inode.c
Merge branch 'xfs-4.10-misc-fixes-3' into for-next
2016-12-07 17:42:30 +11:00
xfs_inode.h
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_inode_item.c
xfs: provide helper for counting extents from if_bytes
2016-11-08 12:59:42 +11:00
xfs_inode_item.h
xfs_ioctl.c
Merge uncontroversial parts of branch 'readlink' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
2016-12-17 19:16:12 -08:00
xfs_ioctl.h
xfs_ioctl32.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
xfs_ioctl32.h
xfs_iomap.c
xfs: use iomap_dio_rw
2016-11-30 14:37:15 +11:00
xfs_iomap.h
xfs: create a separate cow extent size hint for the allocator
2016-10-05 16:26:26 -07:00
xfs_iops.c
Merge uncontroversial parts of branch 'readlink' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
2016-12-17 19:16:12 -08:00
xfs_iops.h
xfs: Propagate dentry down to inode_change_ok()
2016-09-22 10:56:19 +02:00
xfs_itable.c
xfs: create a separate cow extent size hint for the allocator
2016-10-05 16:26:26 -07:00
xfs_itable.h
xfs_linux.h
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
xfs_log.c
xfs: don't print warnings when xfs_log_force fails
2017-01-09 13:45:01 -08:00
xfs_log.h
xfs_log_cil.c
xfs_log_priv.h
xfs: rework log recovery to submit buffers on LSN boundaries
2016-09-26 08:22:16 +10:00
xfs_log_recover.c
Merge branch 'xfs-4.10-misc-fixes-3' into for-next
2016-12-07 17:42:30 +11:00
xfs_message.c
xfs_message.h
xfs_mount.c
xfs: use rhashtable to track buffer cache
2016-12-07 17:36:36 +11:00
xfs_mount.h
xfs: use rhashtable to track buffer cache
2016-12-07 17:36:36 +11:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_ondisk.h
xfs: define the on-disk refcount btree format
2016-10-03 09:11:18 -07:00
xfs_pnfs.c
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_pnfs.h
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_qm.c
xfs: provide helper for counting extents from if_bytes
2016-11-08 12:59:42 +11:00
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_quota.h
xfs_quotaops.c
xfs_refcount_item.c
xfs: fix double-cleanup when CUI recovery fails
2017-01-03 18:39:32 -08:00
xfs_refcount_item.h
xfs: log refcount intent items
2016-10-03 09:11:21 -07:00
xfs_reflink.c
vfs: fix isize/pos/len checks for reflink & dedupe
2016-12-22 23:00:23 -05:00
xfs_reflink.h
xfs: use new extent lookup helpers in xfs_reflink_trim_irec_to_next_cow
2016-11-24 11:39:50 +11:00
xfs_rmap_item.c
xfs: convert unwritten status of reverse mappings for shared files
2016-10-05 16:26:29 -07:00
xfs_rmap_item.h
xfs: convert RUI log formats to use variable length arrays
2016-09-19 10:24:27 +10:00
xfs_rtalloc.c
xfs_rtalloc.h
xfs_stats.c
xfs: make xfs btree stats less huge
2016-12-05 14:38:58 +11:00
xfs_stats.h
xfs: make xfs btree stats less huge
2016-12-05 14:38:58 +11:00
xfs_super.c
xfs: deprecate barrier/nobarrier mount option
2016-12-09 16:49:54 +11:00
xfs_super.h
xfs: quiesce the filesystem after recovery on readonly mount
2016-09-26 08:21:44 +10:00
xfs_symlink.c
xfs: remove i_iolock and use i_rwsem in the VFS inode instead
2016-11-30 14:33:25 +11:00
xfs_symlink.h
xfs_sysctl.c
xfs: garbage collect old cowextsz reservations
2016-10-05 16:26:28 -07:00
xfs_sysctl.h
xfs: garbage collect old cowextsz reservations
2016-10-05 16:26:28 -07:00
xfs_sysfs.c
xfs: fix max_retries _show and _store functions
2017-01-03 20:34:17 -08:00
xfs_sysfs.h
xfs_trace.c
xfs_trace.h
xfs: nuke unused tracepoint definitions
2016-12-09 16:49:54 +11:00
xfs_trans.c
Merge branch 'xfs-4.9-reflink-prep' into for-next
2016-10-03 09:52:31 +11:00
xfs_trans.h
xfs: implement deferred bmbt map/unmap operations
2016-10-04 11:05:44 -07:00
xfs_trans_ail.c
xfs_trans_bmap.c
xfs: implement deferred bmbt map/unmap operations
2016-10-04 11:05:44 -07:00
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs: set up per-AG free space reservations
2016-09-19 10:30:52 +10:00
xfs_trans_inode.c
fs: Replace current_fs_time() with current_time()
2016-09-27 21:06:22 -04:00
xfs_trans_priv.h
xfs_trans_refcount.c
xfs: connect refcount adjust functions to upper layers
2016-10-03 09:11:22 -07:00
xfs_trans_rmap.c
xfs: add shared rmap map/unmap/convert log item types
2016-10-05 16:26:29 -07:00
xfs_xattr.c
xfs: several xattr functions can be void
2016-12-05 12:32:14 +11:00