Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572700

[PATCH 7/7] mm: vmscan: move dirty pages out of the way until they're flushed fix

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject [PATCH 7/7] mm: vmscan: move dirty pages out of the way until they're flushed fix
Date 2017-02-02 20:30 +0100
Message-ID <t6veW-89s-29@gated-at.bofh.it> (permalink)
References <t6veV-89s-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mention the trade-off between waiting for writeback and potentially
causing hot cache refaults in the code where we make this decisions
and activate writeback pages.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/vmscan.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 70103f411247..ae3d982216b5 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1056,6 +1056,15 @@ static unsigned long shrink_page_list(struct list_head *page_list,
 		 *    throttling so we could easily OOM just because too many
 		 *    pages are in writeback and there is nothing else to
 		 *    reclaim. Wait for the writeback to complete.
+		 *
+		 * In cases 1) and 2) we activate the pages to get them out of
+		 * the way while we continue scanning for clean pages on the
+		 * inactive list and refilling from the active list. The
+		 * observation here is that waiting for disk writes is more
+		 * expensive than potentially causing reloads down the line.
+		 * Since they're marked for immediate reclaim, they won't put
+		 * memory pressure on the cache working set any longer than it
+		 * takes to write them to disk.
 		 */
 		if (PageWriteback(page)) {
 			/* Case 1 above */
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] mm: vmscan: fix kswapd writeback regression v2 Johannes Weiner <hannes@cmpxchg.org> - 2017-02-02 20:30 +0100
  [PATCH 7/7] mm: vmscan: move dirty pages out of the way until they're flushed fix Johannes Weiner <hannes@cmpxchg.org> - 2017-02-02 20:30 +0100
  [PATCH 4/7] mm: vmscan: remove old flusher wakeup from direct reclaim path Johannes Weiner <hannes@cmpxchg.org> - 2017-02-02 20:30 +0100
  [PATCH 6/7] mm: vmscan: move dirty pages out of the way until they're flushed Johannes Weiner <hannes@cmpxchg.org> - 2017-02-02 20:30 +0100
    Re: [PATCH 6/7] mm: vmscan: move dirty pages out of the way until they're flushed "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-03 08:50 +0100
      Re: [PATCH 6/7] mm: vmscan: move dirty pages out of the way until  they're flushed Michal Hocko <mhocko@kernel.org> - 2017-02-03 16:20 +0100
  Re: [PATCH 0/7] mm: vmscan: fix kswapd writeback regression v2 Andrew Morton <akpm@linux-foundation.org> - 2017-02-02 23:50 +0100

csiph-web