* [PATCH 0/2] Fix an enhance deactive_page @ 2011-05-01 15:03 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim A few days ago, Ying reported a problem. http://marc.info/?l=linux-mm&m=130403310601663&w=2 After I and Ying dive in problem, We found deactive_page has a problem. Apparently, It's a BUG so [1/2] is fix of the problem and [2/2] is enhancement for helping CPU. Minchan Kim (2): [1/2] Check PageUnevictable in lru_deactivate_fn [2/2] Filter unevictable page out in deactivate_page mm/swap.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 0/2] Fix an enhance deactive_page @ 2011-05-01 15:03 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim A few days ago, Ying reported a problem. http://marc.info/?l=linux-mm&m=130403310601663&w=2 After I and Ying dive in problem, We found deactive_page has a problem. Apparently, It's a BUG so [1/2] is fix of the problem and [2/2] is enhancement for helping CPU. Minchan Kim (2): [1/2] Check PageUnevictable in lru_deactivate_fn [2/2] Filter unevictable page out in deactivate_page mm/swap.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn 2011-05-01 15:03 ` Minchan Kim @ 2011-05-01 15:03 ` Minchan Kim -1 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim The lru_deactivate_fn should not move page which in on unevictable lru into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages as __isolate_lru_page could return -EINVAL. It's really BUG and let's fix it. Reported-by: Ying Han <yinghan@google.com> Tested-by: Ying Han <yinghan@google.com> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> --- mm/swap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index a83ec5a..2e9656d 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) if (!PageLRU(page)) return; + if (PageUnevictable(page)) + return; + /* Some processes are using the page */ if (page_mapped(page)) return; -- 1.7.1 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn @ 2011-05-01 15:03 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim The lru_deactivate_fn should not move page which in on unevictable lru into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages as __isolate_lru_page could return -EINVAL. It's really BUG and let's fix it. Reported-by: Ying Han <yinghan@google.com> Tested-by: Ying Han <yinghan@google.com> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> --- mm/swap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index a83ec5a..2e9656d 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) if (!PageLRU(page)) return; + if (PageUnevictable(page)) + return; + /* Some processes are using the page */ if (page_mapped(page)) return; -- 1.7.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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn 2011-05-01 15:03 ` Minchan Kim @ 2011-05-01 22:10 ` Ying Han -1 siblings, 0 replies; 22+ messages in thread From: Ying Han @ 2011-05-01 22:10 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@gmail.com> wrote: > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han <yinghan@google.com> > Tested-by: Ying Han <yinghan@google.com> > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index a83ec5a..2e9656d 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) > if (!PageLRU(page)) > return; > > + if (PageUnevictable(page)) > + return; > + > /* Some processes are using the page */ > if (page_mapped(page)) > return; > -- > 1.7.1 Thanks Minchan for the fix, and i haven't been able to reproducing the issue after applying the patch. --Ying > ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn @ 2011-05-01 22:10 ` Ying Han 0 siblings, 0 replies; 22+ messages in thread From: Ying Han @ 2011-05-01 22:10 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@gmail.com> wrote: > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han <yinghan@google.com> > Tested-by: Ying Han <yinghan@google.com> > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index a83ec5a..2e9656d 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) > if (!PageLRU(page)) > return; > > + if (PageUnevictable(page)) > + return; > + > /* Some processes are using the page */ > if (page_mapped(page)) > return; > -- > 1.7.1 Thanks Minchan for the fix, and i haven't been able to reproducing the issue after applying the patch. --Ying > -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn 2011-05-01 22:10 ` Ying Han @ 2011-05-01 23:00 ` Minchan Kim -1 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 23:00 UTC (permalink / raw) To: Ying Han Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman On Mon, May 2, 2011 at 7:10 AM, Ying Han <yinghan@google.com> wrote: > On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@gmail.com> wrote: >> The lru_deactivate_fn should not move page which in on unevictable lru >> into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages >> as __isolate_lru_page could return -EINVAL. >> It's really BUG and let's fix it. >> >> Reported-by: Ying Han <yinghan@google.com> >> Tested-by: Ying Han <yinghan@google.com> >> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> >> --- >> mm/swap.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index a83ec5a..2e9656d 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) >> if (!PageLRU(page)) >> return; >> >> + if (PageUnevictable(page)) >> + return; >> + >> /* Some processes are using the page */ >> if (page_mapped(page)) >> return; >> -- >> 1.7.1 > > Thanks Minchan for the fix, and i haven't been able to reproducing the > issue after applying the patch. Thanks for the help, Ying. -- Kind regards, Minchan Kim ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn @ 2011-05-01 23:00 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 23:00 UTC (permalink / raw) To: Ying Han Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman On Mon, May 2, 2011 at 7:10 AM, Ying Han <yinghan@google.com> wrote: > On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@gmail.com> wrote: >> The lru_deactivate_fn should not move page which in on unevictable lru >> into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages >> as __isolate_lru_page could return -EINVAL. >> It's really BUG and let's fix it. >> >> Reported-by: Ying Han <yinghan@google.com> >> Tested-by: Ying Han <yinghan@google.com> >> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> >> --- >> mm/swap.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index a83ec5a..2e9656d 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) >> if (!PageLRU(page)) >> return; >> >> + if (PageUnevictable(page)) >> + return; >> + >> /* Some processes are using the page */ >> if (page_mapped(page)) >> return; >> -- >> 1.7.1 > > Thanks Minchan for the fix, and i haven't been able to reproducing the > issue after applying the patch. Thanks for the help, Ying. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn 2011-05-01 15:03 ` Minchan Kim @ 2011-05-02 10:32 ` KOSAKI Motohiro -1 siblings, 0 replies; 22+ messages in thread From: KOSAKI Motohiro @ 2011-05-02 10:32 UTC (permalink / raw) To: Minchan Kim Cc: kosaki.motohiro, Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han <yinghan@google.com> > Tested-by: Ying Han <yinghan@google.com> > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index a83ec5a..2e9656d 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) > if (!PageLRU(page)) > return; > > + if (PageUnevictable(page)) > + return; > + Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn @ 2011-05-02 10:32 ` KOSAKI Motohiro 0 siblings, 0 replies; 22+ messages in thread From: KOSAKI Motohiro @ 2011-05-02 10:32 UTC (permalink / raw) To: Minchan Kim Cc: kosaki.motohiro, Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han <yinghan@google.com> > Tested-by: Ying Han <yinghan@google.com> > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index a83ec5a..2e9656d 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) > if (!PageLRU(page)) > return; > > + if (PageUnevictable(page)) > + return; > + Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn 2011-05-01 15:03 ` Minchan Kim @ 2011-05-02 14:56 ` Rik van Riel -1 siblings, 0 replies; 22+ messages in thread From: Rik van Riel @ 2011-05-02 14:56 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han On 05/01/2011 11:03 AM, Minchan Kim wrote: > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han<yinghan@google.com> > Tested-by: Ying Han<yinghan@google.com> > Signed-off-by: Minchan Kim<minchan.kim@gmail.com> Reviewed-by: Rik van Riel<riel@redhat.com> -- All rights reversed ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn @ 2011-05-02 14:56 ` Rik van Riel 0 siblings, 0 replies; 22+ messages in thread From: Rik van Riel @ 2011-05-02 14:56 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han On 05/01/2011 11:03 AM, Minchan Kim wrote: > The lru_deactivate_fn should not move page which in on unevictable lru > into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages > as __isolate_lru_page could return -EINVAL. > It's really BUG and let's fix it. > > Reported-by: Ying Han<yinghan@google.com> > Tested-by: Ying Han<yinghan@google.com> > Signed-off-by: Minchan Kim<minchan.kim@gmail.com> Reviewed-by: Rik van Riel<riel@redhat.com> -- All rights reversed -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 2/2] Filter unevictable page out in deactivate_page 2011-05-01 15:03 ` Minchan Kim @ 2011-05-01 15:03 ` Minchan Kim -1 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim It's pointless that deactive_page's pagevec operation about unevictable page as it's nop. This patch removes unnecessary overhead which might be a bit problem in case that there are many unevictable page in system(ex, mprotect workload) Signed-off-by: Minchan Kim <minchan.kim@gmail.com> --- mm/swap.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index 2e9656d..b707694 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) */ void deactivate_page(struct page *page) { + + /* + * In workload which system has many unevictable page(ex, mprotect), + * unevictalge page deactivation for accelerating reclaim + * is pointless. + */ + if (PageUnevictable(page)) + return; + if (likely(get_page_unless_zero(page))) { struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs); -- 1.7.1 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 2/2] Filter unevictable page out in deactivate_page @ 2011-05-01 15:03 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-01 15:03 UTC (permalink / raw) To: Andrew Morton Cc: linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, KOSAKI Motohiro, Mel Gorman, Ying Han, Minchan Kim It's pointless that deactive_page's pagevec operation about unevictable page as it's nop. This patch removes unnecessary overhead which might be a bit problem in case that there are many unevictable page in system(ex, mprotect workload) Signed-off-by: Minchan Kim <minchan.kim@gmail.com> --- mm/swap.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index 2e9656d..b707694 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) */ void deactivate_page(struct page *page) { + + /* + * In workload which system has many unevictable page(ex, mprotect), + * unevictalge page deactivation for accelerating reclaim + * is pointless. + */ + if (PageUnevictable(page)) + return; + if (likely(get_page_unless_zero(page))) { struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs); -- 1.7.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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page 2011-05-01 15:03 ` Minchan Kim @ 2011-05-02 10:37 ` KOSAKI Motohiro -1 siblings, 0 replies; 22+ messages in thread From: KOSAKI Motohiro @ 2011-05-02 10:37 UTC (permalink / raw) To: Minchan Kim Cc: kosaki.motohiro, Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han > It's pointless that deactive_page's pagevec operation about > unevictable page as it's nop. > This patch removes unnecessary overhead which might be a bit problem > in case that there are many unevictable page in system(ex, mprotect workload) > > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index 2e9656d..b707694 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) > */ > void deactivate_page(struct page *page) > { > + > + /* > + * In workload which system has many unevictable page(ex, mprotect), > + * unevictalge page deactivation for accelerating reclaim > + * is pointless. > + */ > + if (PageUnevictable(page)) > + return; > + Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> btw, I think we should check PageLRU too. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page @ 2011-05-02 10:37 ` KOSAKI Motohiro 0 siblings, 0 replies; 22+ messages in thread From: KOSAKI Motohiro @ 2011-05-02 10:37 UTC (permalink / raw) To: Minchan Kim Cc: kosaki.motohiro, Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han > It's pointless that deactive_page's pagevec operation about > unevictable page as it's nop. > This patch removes unnecessary overhead which might be a bit problem > in case that there are many unevictable page in system(ex, mprotect workload) > > Signed-off-by: Minchan Kim <minchan.kim@gmail.com> > --- > mm/swap.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index 2e9656d..b707694 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) > */ > void deactivate_page(struct page *page) > { > + > + /* > + * In workload which system has many unevictable page(ex, mprotect), > + * unevictalge page deactivation for accelerating reclaim > + * is pointless. > + */ > + if (PageUnevictable(page)) > + return; > + Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> btw, I think we should check PageLRU too. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page 2011-05-02 10:37 ` KOSAKI Motohiro @ 2011-05-03 0:29 ` Minchan Kim -1 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-03 0:29 UTC (permalink / raw) To: KOSAKI Motohiro Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han Hi KOSAKI, On Mon, May 2, 2011 at 7:37 PM, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote: >> It's pointless that deactive_page's pagevec operation about >> unevictable page as it's nop. >> This patch removes unnecessary overhead which might be a bit problem >> in case that there are many unevictable page in system(ex, mprotect workload) >> >> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> >> --- >> mm/swap.c | 9 +++++++++ >> 1 files changed, 9 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index 2e9656d..b707694 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) >> */ >> void deactivate_page(struct page *page) >> { >> + >> + /* >> + * In workload which system has many unevictable page(ex, mprotect), >> + * unevictalge page deactivation for accelerating reclaim >> + * is pointless. >> + */ >> + if (PageUnevictable(page)) >> + return; >> + > > Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > Thanks! > > btw, I think we should check PageLRU too. > Yes. I remember you advised it when we push this patch but I didn't. That's because I think most of pages in such context would be LRU as they are cached pages. So IMO, PageLRU checking in deactivate_page couldn't help much. -- Kind regards, Minchan Kim ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page @ 2011-05-03 0:29 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-03 0:29 UTC (permalink / raw) To: KOSAKI Motohiro Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, Rik van Riel, Mel Gorman, Ying Han Hi KOSAKI, On Mon, May 2, 2011 at 7:37 PM, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote: >> It's pointless that deactive_page's pagevec operation about >> unevictable page as it's nop. >> This patch removes unnecessary overhead which might be a bit problem >> in case that there are many unevictable page in system(ex, mprotect workload) >> >> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> >> --- >> mm/swap.c | 9 +++++++++ >> 1 files changed, 9 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index 2e9656d..b707694 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) >> */ >> void deactivate_page(struct page *page) >> { >> + >> + /* >> + * In workload which system has many unevictable page(ex, mprotect), >> + * unevictalge page deactivation for accelerating reclaim >> + * is pointless. >> + */ >> + if (PageUnevictable(page)) >> + return; >> + > > Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > Thanks! > > btw, I think we should check PageLRU too. > Yes. I remember you advised it when we push this patch but I didn't. That's because I think most of pages in such context would be LRU as they are cached pages. So IMO, PageLRU checking in deactivate_page couldn't help much. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page 2011-05-01 15:03 ` Minchan Kim @ 2011-05-02 14:57 ` Rik van Riel -1 siblings, 0 replies; 22+ messages in thread From: Rik van Riel @ 2011-05-02 14:57 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han On 05/01/2011 11:03 AM, Minchan Kim wrote: > It's pointless that deactive_page's pagevec operation about > unevictable page as it's nop. > This patch removes unnecessary overhead which might be a bit problem > in case that there are many unevictable page in system(ex, mprotect workload) > > Signed-off-by: Minchan Kim<minchan.kim@gmail.com> > --- > mm/swap.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index 2e9656d..b707694 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) > */ > void deactivate_page(struct page *page) > { > + > + /* > + * In workload which system has many unevictable page(ex, mprotect), > + * unevictalge page deactivation for accelerating reclaim Typo. > + * is pointless. > + */ > + if (PageUnevictable(page)) > + return; > + > if (likely(get_page_unless_zero(page))) { > struct pagevec *pvec =&get_cpu_var(lru_deactivate_pvecs); > -- All rights reversed ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page @ 2011-05-02 14:57 ` Rik van Riel 0 siblings, 0 replies; 22+ messages in thread From: Rik van Riel @ 2011-05-02 14:57 UTC (permalink / raw) To: Minchan Kim Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han On 05/01/2011 11:03 AM, Minchan Kim wrote: > It's pointless that deactive_page's pagevec operation about > unevictable page as it's nop. > This patch removes unnecessary overhead which might be a bit problem > in case that there are many unevictable page in system(ex, mprotect workload) > > Signed-off-by: Minchan Kim<minchan.kim@gmail.com> > --- > mm/swap.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/mm/swap.c b/mm/swap.c > index 2e9656d..b707694 100644 > --- a/mm/swap.c > +++ b/mm/swap.c > @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) > */ > void deactivate_page(struct page *page) > { > + > + /* > + * In workload which system has many unevictable page(ex, mprotect), > + * unevictalge page deactivation for accelerating reclaim Typo. > + * is pointless. > + */ > + if (PageUnevictable(page)) > + return; > + > if (likely(get_page_unless_zero(page))) { > struct pagevec *pvec =&get_cpu_var(lru_deactivate_pvecs); > -- All rights reversed -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page 2011-05-02 14:57 ` Rik van Riel @ 2011-05-03 0:30 ` Minchan Kim -1 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-03 0:30 UTC (permalink / raw) To: Rik van Riel Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han Hi Rik, On Mon, May 2, 2011 at 11:57 PM, Rik van Riel <riel@redhat.com> wrote: > On 05/01/2011 11:03 AM, Minchan Kim wrote: >> >> It's pointless that deactive_page's pagevec operation about >> unevictable page as it's nop. >> This patch removes unnecessary overhead which might be a bit problem >> in case that there are many unevictable page in system(ex, mprotect >> workload) >> >> Signed-off-by: Minchan Kim<minchan.kim@gmail.com> >> --- >> mm/swap.c | 9 +++++++++ >> 1 files changed, 9 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index 2e9656d..b707694 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) >> */ >> void deactivate_page(struct page *page) >> { >> + >> + /* >> + * In workload which system has many unevictable page(ex, >> mprotect), >> + * unevictalge page deactivation for accelerating reclaim > > Typo. My bad. I will resend after work. Thanks. -- Kind regards, Minchan Kim ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/2] Filter unevictable page out in deactivate_page @ 2011-05-03 0:30 ` Minchan Kim 0 siblings, 0 replies; 22+ messages in thread From: Minchan Kim @ 2011-05-03 0:30 UTC (permalink / raw) To: Rik van Riel Cc: Andrew Morton, linux-mm, LKML, KAMEZAWA Hiroyuki, Johannes Weiner, KOSAKI Motohiro, Mel Gorman, Ying Han Hi Rik, On Mon, May 2, 2011 at 11:57 PM, Rik van Riel <riel@redhat.com> wrote: > On 05/01/2011 11:03 AM, Minchan Kim wrote: >> >> It's pointless that deactive_page's pagevec operation about >> unevictable page as it's nop. >> This patch removes unnecessary overhead which might be a bit problem >> in case that there are many unevictable page in system(ex, mprotect >> workload) >> >> Signed-off-by: Minchan Kim<minchan.kim@gmail.com> >> --- >> mm/swap.c | 9 +++++++++ >> 1 files changed, 9 insertions(+), 0 deletions(-) >> >> diff --git a/mm/swap.c b/mm/swap.c >> index 2e9656d..b707694 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) >> */ >> void deactivate_page(struct page *page) >> { >> + >> + /* >> + * In workload which system has many unevictable page(ex, >> mprotect), >> + * unevictalge page deactivation for accelerating reclaim > > Typo. My bad. I will resend after work. Thanks. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2011-05-03 0:30 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-05-01 15:03 [PATCH 0/2] Fix an enhance deactive_page Minchan Kim 2011-05-01 15:03 ` Minchan Kim 2011-05-01 15:03 ` [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn Minchan Kim 2011-05-01 15:03 ` Minchan Kim 2011-05-01 22:10 ` Ying Han 2011-05-01 22:10 ` Ying Han 2011-05-01 23:00 ` Minchan Kim 2011-05-01 23:00 ` Minchan Kim 2011-05-02 10:32 ` KOSAKI Motohiro 2011-05-02 10:32 ` KOSAKI Motohiro 2011-05-02 14:56 ` Rik van Riel 2011-05-02 14:56 ` Rik van Riel 2011-05-01 15:03 ` [PATCH 2/2] Filter unevictable page out in deactivate_page Minchan Kim 2011-05-01 15:03 ` Minchan Kim 2011-05-02 10:37 ` KOSAKI Motohiro 2011-05-02 10:37 ` KOSAKI Motohiro 2011-05-03 0:29 ` Minchan Kim 2011-05-03 0:29 ` Minchan Kim 2011-05-02 14:57 ` Rik van Riel 2011-05-02 14:57 ` Rik van Riel 2011-05-03 0:30 ` Minchan Kim 2011-05-03 0:30 ` Minchan Kim
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.