Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1226043 > unrolled thread
| Started by | Yaowei Bai <bywxiaobai@163.com> |
|---|---|
| First post | 2015-09-16 14:20 +0200 |
| Last post | 2015-09-22 01:10 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly Yaowei Bai <bywxiaobai@163.com> - 2015-09-16 14:20 +0200
Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly Michal Hocko <mhocko@kernel.org> - 2015-09-21 18:20 +0200
Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly Yaowei Bai <bywxiaobai@163.com> - 2015-09-22 15:30 +0200
Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly David Rientjes <rientjes@google.com> - 2015-09-22 01:10 +0200
| From | Yaowei Bai <bywxiaobai@163.com> |
|---|---|
| Date | 2015-09-16 14:20 +0200 |
| Subject | [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly |
| Message-ID | <q9jQR-4b3-3@gated-at.bofh.it> |
Delete unnecessary if to let inactive_anon_is_low_global return directly. No functional changes. Signed-off-by: Yaowei Bai <bywxiaobai@163.com> --- mm/vmscan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2d978b2..2785d8e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1866,10 +1866,7 @@ static int inactive_anon_is_low_global(struct zone *zone) active = zone_page_state(zone, NR_ACTIVE_ANON); inactive = zone_page_state(zone, NR_INACTIVE_ANON); - if (inactive * zone->inactive_ratio < active) - return 1; - - return 0; + return inactive * zone->inactive_ratio < active; } /** -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2015-09-21 18:20 +0200 |
| Subject | Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly |
| Message-ID | <qbbYS-3k6-13@gated-at.bofh.it> |
| In reply to | #1226043 |
On Wed 16-09-15 19:59:58, Yaowei Bai wrote: > Delete unnecessary if to let inactive_anon_is_low_global return > directly. > > No functional changes. Is this really an improvement? I am not so sure. If anything the function has a bool return semantic... > Signed-off-by: Yaowei Bai <bywxiaobai@163.com> > --- > mm/vmscan.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 2d978b2..2785d8e 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1866,10 +1866,7 @@ static int inactive_anon_is_low_global(struct zone *zone) > active = zone_page_state(zone, NR_ACTIVE_ANON); > inactive = zone_page_state(zone, NR_INACTIVE_ANON); > > - if (inactive * zone->inactive_ratio < active) > - return 1; > - > - return 0; > + return inactive * zone->inactive_ratio < active; > } > > /** > -- > 1.9.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> -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Yaowei Bai <bywxiaobai@163.com> |
|---|---|
| Date | 2015-09-22 15:30 +0200 |
| Subject | Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly |
| Message-ID | <qbvNT-6Aq-5@gated-at.bofh.it> |
| In reply to | #1229526 |
On Mon, Sep 21, 2015 at 06:18:07PM +0200, Michal Hocko wrote: > On Wed 16-09-15 19:59:58, Yaowei Bai wrote: > > Delete unnecessary if to let inactive_anon_is_low_global return > > directly. > > > > No functional changes. > > Is this really an improvement? I am not so sure. If anything the > function has a bool return semantic... Just FYI, I also sent a patch making inactive_anon_is_low_global return bool and it has been added into Andrew's -mm tree. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Date | 2015-09-22 01:10 +0200 |
| Subject | Re: [PATCH 1/3] mm/vmscan: make inactive_anon_is_low_global return directly |
| Message-ID | <qbinD-4dy-3@gated-at.bofh.it> |
| In reply to | #1226043 |
On Wed, 16 Sep 2015, Yaowei Bai wrote: > Delete unnecessary if to let inactive_anon_is_low_global return > directly. > > No functional changes. > > Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Acked-by: David Rientjes <rientjes@google.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web