linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] free reclaimed pages by paging out instantly
@ 2013-05-13  2:10 Minchan Kim
  2013-05-13  2:10 ` [RFC 1/4] mm: Don't hide spin_lock in swap_info_get Minchan Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Minchan Kim @ 2013-05-13  2:10 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Rik van Riel, Mel Gorman, Johannes Weiner,
	Kamezawa Hiroyuki, Michal Hocko, Hugh Dickins, Minchan Kim

Normally, I/O completed pages for reclaim would be rotated into 
inactive LRU tail. IMHO, the why we did is we can't remove the page
from page cache and (swap cache, swap slot) by locking problem.

So for reclaiming the I/O completed pages, we need one more iteration
of reclaim and it could make unnecessary CPU overhead(ex,
acitve->inactive deactivation, isolation, shrink_page_list).

Another concern is related to per process reclaim, which smart platform
can reclaim some of the process's pages forcely without OOM kill before
VM reaches a latency trouble. Assuming that people does per process
reclaim on some processes before even kswapd runs(ie, free pages > high
watermark).

And they believe nr_free_pages in vmstat should be increased but it's
not true because reclaimed pages caused by paging out(ex, swap page,
dirty pages) will be not freed until kswapd runs in the future so that
the platform confused and discard more workingset unnecessary or 
reclaims more processes until the nr_free_pages is increased by
our goal.

This patch makes swap cache free logic being aware of irq context
so we can free reclaimed pages asap without rotating them back into
LRU's tail so that it can reduce unnecessary CPU overhead and LRU
churning and makes VM more intuitive.

Big problem of this patch is how to handle for memcg.
I hope please memcg guys look at description [3/4] and get feedback.

Minchan Kim (4):
  [1] mm: Don't hide spin_lock in swap_info_get
  [2] mm: introduce __swapcache_free
  [3] mm: support remove_mapping in irqcontext
  [4] mm: free reclaimed pages instantly without depending next reclaim

 fs/splice.c          |  2 +-
 include/linux/swap.h | 12 ++++++++++-
 mm/filemap.c         |  6 +++---
 mm/swap.c            | 14 ++++++++++++-
 mm/swapfile.c        | 22 +++++++++++++++------
 mm/truncate.c        |  2 +-
 mm/vmscan.c          | 56 +++++++++++++++++++++++++++++++++++++++++++---------
 7 files changed, 92 insertions(+), 22 deletions(-)

-- 
1.8.2.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-15  7:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-13  2:10 [RFC 0/4] free reclaimed pages by paging out instantly Minchan Kim
2013-05-13  2:10 ` [RFC 1/4] mm: Don't hide spin_lock in swap_info_get Minchan Kim
2013-05-13  2:10 ` [RFC 2/4] mm: introduce __swapcache_free Minchan Kim
2013-05-13  2:10 ` [RFC 3/4] mm: support remove_mapping in irqcontext Minchan Kim
2013-05-13 14:58   ` Michal Hocko
2013-05-14  7:17     ` Minchan Kim
2013-05-13  2:10 ` [RFC 4/4] mm: free reclaimed pages instantly without depending next reclaim Minchan Kim
2013-05-14 17:32   ` Rik van Riel
2013-05-15  7:12     ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).