mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback.patch removed from -mm tree
Subsystems (4)
[email protected]
maintainerSubject: [merged] mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 08 Jul 2013 12:24:45 -0700
The patch titled
Subject: mm: vmscan: block kswapd if it is encountering pages under writeback
has been removed from the -mm tree. Its filename was
mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm: vmscan: block kswapd if it is encountering pages under writeback
Historically, kswapd used to congestion_wait() at higher priorities if it was not making forward progress. This made no sense as the failure to make progress could be completely independent of IO. It was later replaced by wait_iff_congested() and removed entirely by commit 258401a6 (mm: don't wait on congested zones in balance_pgdat()) as it was duplicating logic in shrink_inactive_list().
This is problematic. If kswapd encounters many pages under writeback and it continues to scan until it reaches the high watermark then it will quickly skip over the pages under writeback and reclaim clean young pages or push applications out to swap.
The use of wait_iff_congested() is not suited to kswapd as it will only stall if the underlying BDI is really congested or a direct reclaimer was unable to write to the underlying BDI. kswapd bypasses the BDI congestion as it sets PF_SWAPWRITE but even if this was taken into account then it would cause direct reclaimers to stall on writeback which is not desirable.
This patch sets a ZONE_WRITEBACK flag if direct reclaim or kswapd is encountering too many pages under writeback. If this flag is set and kswapd encounters a PageReclaim page under writeback then it'll assume that the LRU lists are being recycled too quickly before IO can complete and block waiting for some IO to complete.
---
include/linux/mmzone.h | 8 +++ mm/vmscan.c | 82 ++++++++++++++++++++++++++++----------- 2 files changed, 68 insertions(+), 22 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback +8 -0
@@ -499,6 +499,9 @@ typedef enum {* many dirty file pages at the tail * of the LRU. */ +ZONE_WRITEBACK ,/* reclaim scanning has recently found +* many pages under writeback +*/ } zone_flags_t;static inline void zone_set_flag (struct zone *zone,zone_flags_t flag)
@@ -526,6 +529,11 @@ static inline int zone_is_reclaim_dirty(return test_bit (ZONE_TAIL_LRU_DIRTY , &zone->flags); } +static inline int zone_is_reclaim_writeback (const struct zone *zone) +{ +return test_bit (ZONE_WRITEBACK , &zone->flags); +} +static inline int zone_is_reclaim_locked (const struct zone *zone) {return test_bit (ZONE_RECLAIM_LOCKED , &zone->flags);
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-block-kswapd-if-it-is-encountering-pages-under-writeback +60 -22
116 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
origin.patch
linux-next.patch
fs-bump-inode-and-dentry-counters-to-long.patch super-fix-calculation-of-shrinkable-objects-for-small-numbers.patch dcache-convert-dentry_statnr_unused-to-per-cpu-counters.patch dentry-move-to-per-sb-lru-locks.patch dcache-remove-dentries-from-lru-before-putting-on-dispose-list.patch mm-new-shrinker-api.patch shrinker-convert-superblock-shrinkers-to-new-api.patch list-add-a-new-lru-list-type.patch inode-convert-inode-lru-list-to-generic-lru-list-code.patch dcache-convert-to-use-new-lru-list-infrastructure.patch list_lru-per-node-list-infrastructure.patch
list_lru-per-node-api.patch
shrinker-add-node-awareness.patch
vmscan-per-node-deferred-work.patch fs-convert-inode-and-dentry-shrinking-to-be-node-aware.patch xfs-convert-buftarg-lru-to-generic-code.patch xfs-rework-buffer-dispose-list-tracking.patch xfs-convert-dquot-cache-lru-to-list_lru.patch fs-convert-fs-shrinkers-to-new-scan-count-api.patch drivers-convert-shrinkers-to-new-count-scan-api.patch i915-bail-out-earlier-when-shrinker-cannot-acquire-mutex.patch shrinker-convert-remaining-shrinkers-to-count-scan-api.patch hugepage-convert-huge-zero-page-shrinker-to-new-shrinker-api.patch shrinker-kill-old-shrink-api.patch list_lru-dynamically-adjust-node-arrays.patch
zbud-add-to-mm.patch
zswap-add-to-mm.patch
zswap-add-documentation.patch mm-vmscan-do-not-continue-scanning-if-reclaim-was-aborted-for-compaction.patch mm-vmscan-do-not-scale-writeback-pages-when-deciding-whether-to-set-zone_writeback.patch mm-memmap_init_zone-performance-improvement.patch