All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC] mm:do recheck for freeable page in reclaim path
@ 2015-03-19  0:42 ` Minchan Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2015-03-19  0:42 UTC (permalink / raw)
  To: Wang, Yalin
  Cc: Andrew Morton, linux-kernel, linux-mm, Michal Hocko,
	Johannes Weiner, Mel Gorman, Rik van Riel, Shaohua Li

Do not send your patch to this thread. It's second time.
Your patch is totally irrelevant to this patchset.
Send your patch as another thread.

On Wed, Mar 11, 2015 at 05:47:28PM +0800, Wang, Yalin wrote:
> In reclaim path, if encounter a freeable page,
> the try_to_unmap may fail, because the page's pte is
> dirty, we can recheck this page as normal non-freeable page,
> this means we can swap out this page into swap partition.

Pz, Pz, Pz write down more detail in description.

You mean page_check_references in shrink_page_list decided
it as freeable page but try_to_unmap failed because someone
touched the page during the race window between page_check_references
and try_to_unmap in shrink_page_list?

If so, it's surely recent referenced page so it should be promoted
to active list.

If I missed something, please write it down more detail in description
and send a patch as new thread, not sending it to this patchset thread.

-- 
Kind regards,
Minchan Kim

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

* Re: [RFC] mm:do recheck for freeable page in reclaim path
@ 2015-03-19  0:42 ` Minchan Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2015-03-19  0:42 UTC (permalink / raw)
  To: Wang, Yalin
  Cc: Andrew Morton, linux-kernel, linux-mm, Michal Hocko,
	Johannes Weiner, Mel Gorman, Rik van Riel, Shaohua Li

Do not send your patch to this thread. It's second time.
Your patch is totally irrelevant to this patchset.
Send your patch as another thread.

On Wed, Mar 11, 2015 at 05:47:28PM +0800, Wang, Yalin wrote:
> In reclaim path, if encounter a freeable page,
> the try_to_unmap may fail, because the page's pte is
> dirty, we can recheck this page as normal non-freeable page,
> this means we can swap out this page into swap partition.

Pz, Pz, Pz write down more detail in description.

You mean page_check_references in shrink_page_list decided
it as freeable page but try_to_unmap failed because someone
touched the page during the race window between page_check_references
and try_to_unmap in shrink_page_list?

If so, it's surely recent referenced page so it should be promoted
to active list.

If I missed something, please write it down more detail in description
and send a patch as new thread, not sending it to this patchset thread.

-- 
Kind regards,
Minchan Kim

--
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] 4+ messages in thread

* [RFC] mm:do recheck for freeable page in reclaim path
  2015-03-11  1:20 ` [PATCH 3/4] mm: move lazy free pages to inactive list Minchan Kim
@ 2015-03-11  9:47     ` Wang, Yalin
  0 siblings, 0 replies; 4+ messages in thread
From: Wang, Yalin @ 2015-03-11  9:47 UTC (permalink / raw)
  To: 'Minchan Kim',
	Andrew Morton, linux-kernel, linux-mm, Michal Hocko,
	Johannes Weiner, Mel Gorman, Rik van Riel, Shaohua Li

In reclaim path, if encounter a freeable page,
the try_to_unmap may fail, because the page's pte is
dirty, we can recheck this page as normal non-freeable page,
this means we can swap out this page into swap partition.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
---
 mm/vmscan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 260c413..9930850 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1000,6 +1000,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
 			}
 		}
 
+recheck:
 		if (!force_reclaim)
 			references = page_check_references(page, sc,
 							&freeable);
@@ -1045,6 +1046,10 @@ unmap:
 			switch (try_to_unmap(page,
 				freeable ? TTU_FREE : ttu_flags)) {
 			case SWAP_FAIL:
+				if (freeable) {
+					freeable = false;
+					goto recheck;
+				}
 				goto activate_locked;
 			case SWAP_AGAIN:
 				goto keep_locked;
-- 
2.2.2

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

* [RFC] mm:do recheck for freeable page in reclaim path
@ 2015-03-11  9:47     ` Wang, Yalin
  0 siblings, 0 replies; 4+ messages in thread
From: Wang, Yalin @ 2015-03-11  9:47 UTC (permalink / raw)
  To: 'Minchan Kim',
	Andrew Morton, linux-kernel, linux-mm, Michal Hocko,
	Johannes Weiner, Mel Gorman, Rik van Riel, Shaohua Li

In reclaim path, if encounter a freeable page,
the try_to_unmap may fail, because the page's pte is
dirty, we can recheck this page as normal non-freeable page,
this means we can swap out this page into swap partition.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
---
 mm/vmscan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 260c413..9930850 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1000,6 +1000,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
 			}
 		}
 
+recheck:
 		if (!force_reclaim)
 			references = page_check_references(page, sc,
 							&freeable);
@@ -1045,6 +1046,10 @@ unmap:
 			switch (try_to_unmap(page,
 				freeable ? TTU_FREE : ttu_flags)) {
 			case SWAP_FAIL:
+				if (freeable) {
+					freeable = false;
+					goto recheck;
+				}
 				goto activate_locked;
 			case SWAP_AGAIN:
 				goto keep_locked;
-- 
2.2.2

--
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 related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19  0:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19  0:42 [RFC] mm:do recheck for freeable page in reclaim path Minchan Kim
2015-03-19  0:42 ` Minchan Kim
  -- strict thread matches above, loose matches on Subject: below --
2015-03-11  1:20 [PATCH 1/4] mm: free swp_entry in madvise_free Minchan Kim
2015-03-11  1:20 ` [PATCH 3/4] mm: move lazy free pages to inactive list Minchan Kim
2015-03-11  9:47   ` [RFC] mm:do recheck for freeable page in reclaim path Wang, Yalin
2015-03-11  9:47     ` Wang, Yalin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.