Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565518 > unrolled thread
| Started by | Jia He <hejianet@gmail.com> |
|---|---|
| First post | 2017-01-24 08:50 +0100 |
| Last post | 2017-01-25 03:30 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value Jia He <hejianet@gmail.com> - 2017-01-24 08:50 +0100
Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value Rik van Riel <riel@redhat.com> - 2017-01-24 23:10 +0100
Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value hejianet <hejianet@gmail.com> - 2017-01-25 03:30 +0100
| From | Jia He <hejianet@gmail.com> |
|---|---|
| Date | 2017-01-24 08:50 +0100 |
| Subject | [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value |
| Message-ID | <t341z-1po-1@gated-at.bofh.it> |
When there is no reclaimable pages in the zone, even the zone is not balanced, we let kswapd go sleeping. That is prepare_kswapd_sleep will return true in this case. Signed-off-by: Jia He <hejianet@gmail.com> --- mm/vmscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 7396a0a..54445e2 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3140,7 +3140,8 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, int classzone_idx) if (!managed_zone(zone)) continue; - if (!zone_balanced(zone, order, classzone_idx)) + if (!zone_balanced(zone, order, classzone_idx) + && !zone_reclaimable_pages(zone)) return false; } -- 2.5.5
[toc] | [next] | [standalone]
| From | Rik van Riel <riel@redhat.com> |
|---|---|
| Date | 2017-01-24 23:10 +0100 |
| Subject | Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value |
| Message-ID | <t3hrQ-1E3-7@gated-at.bofh.it> |
| In reply to | #1565518 |
On Tue, 2017-01-24 at 15:49 +0800, Jia He wrote: > When there is no reclaimable pages in the zone, even the zone is > not balanced, we let kswapd go sleeping. That is prepare_kswapd_sleep > will return true in this case. > > Signed-off-by: Jia He <hejianet@gmail.com> > --- > mm/vmscan.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 7396a0a..54445e2 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -3140,7 +3140,8 @@ static bool prepare_kswapd_sleep(pg_data_t > *pgdat, int order, int classzone_idx) > if (!managed_zone(zone)) > continue; > > - if (!zone_balanced(zone, order, classzone_idx)) > + if (!zone_balanced(zone, order, classzone_idx) > + && !zone_reclaimable_pages(zone)) > return false; > } This patch does the opposite of what your changelog says. The above keeps kswapd running forever if the zone is not balanced, and there are no reclaimable pages.
[toc] | [prev] | [next] | [standalone]
| From | hejianet <hejianet@gmail.com> |
|---|---|
| Date | 2017-01-25 03:30 +0100 |
| Subject | Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value |
| Message-ID | <t3lvr-47m-5@gated-at.bofh.it> |
| In reply to | #1566191 |
On 25/01/2017 6:01 AM, Rik van Riel wrote: > On Tue, 2017-01-24 at 15:49 +0800, Jia He wrote: >> When there is no reclaimable pages in the zone, even the zone is >> not balanced, we let kswapd go sleeping. That is prepare_kswapd_sleep >> will return true in this case. >> >> Signed-off-by: Jia He <hejianet@gmail.com> >> --- >> mm/vmscan.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/mm/vmscan.c b/mm/vmscan.c >> index 7396a0a..54445e2 100644 >> --- a/mm/vmscan.c >> +++ b/mm/vmscan.c >> @@ -3140,7 +3140,8 @@ static bool prepare_kswapd_sleep(pg_data_t >> *pgdat, int order, int classzone_idx) >> if (!managed_zone(zone)) >> continue; >> >> - if (!zone_balanced(zone, order, classzone_idx)) >> + if (!zone_balanced(zone, order, classzone_idx) >> + && !zone_reclaimable_pages(zone)) >> return false; >> } > > This patch does the opposite of what your changelog > says. The above keeps kswapd running forever if > the zone is not balanced, and there are no reclaimable > pages. sorry for the mistake, I will check what happened. I tested in my local system. B.R. Jia > >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web