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


Groups > linux.kernel > #1447617

Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned

From Minchan Kim <minchan@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned
Date 2016-07-21 07:20 +0200
Message-ID <rXeyR-35v-3@gated-at.bofh.it> (permalink)
References <rX1BD-39C-7@gated-at.bofh.it> <rX1BD-39C-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 20, 2016 at 04:21:47PM +0100, Mel Gorman wrote:
> Page reclaim determines whether a pgdat is unreclaimable by examining how
> many pages have been scanned since a page was freed and comparing that
> to the LRU sizes. Skipped pages are not considered reclaim candidates but
> contribute to scanned. This can prematurely mark a pgdat as unreclaimable
> and trigger an OOM kill.
> 
> While this does not fix an OOM kill message reported by Joonsoo Kim,
> it did stop pgdat being marked unreclaimable.
> 
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> ---
>  mm/vmscan.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 22aec2bcfeec..b16d578ce556 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1415,7 +1415,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
>  	LIST_HEAD(pages_skipped);
>  
>  	for (scan = 0; scan < nr_to_scan && nr_taken < nr_to_scan &&
> -					!list_empty(src); scan++) {
> +					!list_empty(src);) {
>  		struct page *page;
>  
>  		page = lru_to_page(src);
> @@ -1429,6 +1429,9 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
>  			continue;
>  		}
>  
> +		/* Pages skipped do not contribute to scan */

The comment should explain why.

/* Pages skipped do not contribute to scan to prevent premature OOM */


> +		scan++;
> +


The one of my concern about node-lru is to add more lru lock contetion
in multiple zone system so such unbounded skip scanning under the lock
should have a limit to prevent latency spike and serialization of
current reclaim work.

Another concern is big mismatch between the number of pages from list and
LRU stat count because lruvec_lru_size call sites don't take the stat
under the lock while isolate_lru_pages moves many pages from lru list
to temporal skipped list.


>  		switch (__isolate_lru_page(page, mode)) {
>  		case 0:
>  			nr_pages = hpage_nr_pages(page);
> -- 
> 2.6.4
> 
> -- 
> 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>

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


Thread

[PATCH 0/5] Candidate fixes for premature OOM kills with node-lru v1 Mel Gorman <mgorman@techsingularity.net> - 2016-07-20 17:30 +0200
  [PATCH 2/5] mm: add per-zone lru list stat Mel Gorman <mgorman@techsingularity.net> - 2016-07-20 17:30 +0200
    Re: [PATCH 2/5] mm: add per-zone lru list stat Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-21 09:10 +0200
      Re: [PATCH 2/5] mm: add per-zone lru list stat Fengguang Wu <fengguang.wu@intel.com> - 2016-07-23 02:50 +0200
        Re: [PATCH 2/5] mm: add per-zone lru list stat Minchan Kim <minchan@kernel.org> - 2016-07-23 03:30 +0200
  [PATCH 3/5] mm, vmscan: Remove highmem_file_pages Mel Gorman <mgorman@techsingularity.net> - 2016-07-20 17:30 +0200
  [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Mel Gorman <mgorman@techsingularity.net> - 2016-07-20 17:30 +0200
    Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Minchan Kim <minchan@kernel.org> - 2016-07-21 07:20 +0200
      Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 10:20 +0200
        Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Minchan Kim <minchan@kernel.org> - 2016-07-21 10:40 +0200
    Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Minchan Kim <minchan@kernel.org> - 2016-07-25 10:10 +0200
      Re: [PATCH 1/5] mm, vmscan: Do not account skipped pages as scanned Mel Gorman <mgorman@techsingularity.net> - 2016-07-25 11:30 +0200
  [PATCH 4/5] mm: Remove reclaim and compaction retry approximations Mel Gorman <mgorman@techsingularity.net> - 2016-07-20 17:30 +0200
  Re: [PATCH 0/5] Candidate fixes for premature OOM kills with  node-lru v1 Minchan Kim <minchan@kernel.org> - 2016-07-21 09:10 +0200
    Re: [PATCH 0/5] Candidate fixes for premature OOM kills with  node-lru v1 Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 11:20 +0200
  Re: [PATCH 0/5] Candidate fixes for premature OOM kills with  node-lru v1 Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-21 09:30 +0200
    Re: [PATCH 0/5] Candidate fixes for premature OOM kills with  node-lru v1 Minchan Kim <minchan@kernel.org> - 2016-07-21 10:40 +0200
    Re: [PATCH 0/5] Candidate fixes for premature OOM kills with  node-lru v1 Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 11:20 +0200

csiph-web