Message ID | 20220327024101.10378-1-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] mm/vmscan: reclaim only affects managed_zones | expand |
On 2022/3/27 10:41, Wei Yang wrote: > As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and > reclaim from zones with pages managed by the buddy allocator") , reclaim > only affects managed_zones. > > Let's adjust the code and comment accordingly. > > Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Looks good to me. Thanks. Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/vmscan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 7ad54b770bb1..89745cf34386 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1031,7 +1031,7 @@ static bool skip_throttle_noprogress(pg_data_t *pgdat) > for (i = 0; i < MAX_NR_ZONES; i++) { > struct zone *zone = pgdat->node_zones + i; > > - if (!populated_zone(zone)) > + if (!managed_zone(zone)) > continue; > > reclaimable += zone_reclaimable_pages(zone); > @@ -3912,7 +3912,7 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int highest_zoneidx) > } > > /* > - * If a node has no populated zone within highest_zoneidx, it does not > + * If a node has no managed zone within highest_zoneidx, it does not > * need balancing by definition. This can happen if a zone-restricted > * allocation tries to wake a remote kswapd. > */ >
On 27.03.22 04:41, Wei Yang wrote: > As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and > reclaim from zones with pages managed by the buddy allocator") , reclaim > only affects managed_zones. > > Let's adjust the code and comment accordingly. > > Signed-off-by: Wei Yang <richard.weiyang@gmail.com> > --- > mm/vmscan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 7ad54b770bb1..89745cf34386 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1031,7 +1031,7 @@ static bool skip_throttle_noprogress(pg_data_t *pgdat) > for (i = 0; i < MAX_NR_ZONES; i++) { > struct zone *zone = pgdat->node_zones + i; > > - if (!populated_zone(zone)) > + if (!managed_zone(zone)) > continue; > > reclaimable += zone_reclaimable_pages(zone); > @@ -3912,7 +3912,7 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int highest_zoneidx) > } > > /* > - * If a node has no populated zone within highest_zoneidx, it does not > + * If a node has no managed zone within highest_zoneidx, it does not > * need balancing by definition. This can happen if a zone-restricted > * allocation tries to wake a remote kswapd. > */ Reviewed-by: David Hildenbrand <david@redhat.com>
On Sun, Mar 27, 2022 at 02:41:00AM +0000, Wei Yang wrote: > As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and > reclaim from zones with pages managed by the buddy allocator") , reclaim > only affects managed_zones. > > Let's adjust the code and comment accordingly. > > Signed-off-by: Wei Yang <richard.weiyang@gmail.com> LGTM, Reviewed-by: Oscar Salvador <osalvador@suse.de> We still have some other places scattered all over where we use populated_zone(). I think it should be great to check whether all those usages are right.
On Mon, Mar 28, 2022 at 10:14:10AM +0200, Oscar Salvador wrote: >On Sun, Mar 27, 2022 at 02:41:00AM +0000, Wei Yang wrote: >> As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and >> reclaim from zones with pages managed by the buddy allocator") , reclaim >> only affects managed_zones. >> >> Let's adjust the code and comment accordingly. >> >> Signed-off-by: Wei Yang <richard.weiyang@gmail.com> > >LGTM, > >Reviewed-by: Oscar Salvador <osalvador@suse.de> > >We still have some other places scattered all over where we use >populated_zone(). >I think it should be great to check whether all those usages are >right. > Thanks. This time I have checked vmscan related places, it looks all related part are fixed. For others, I didn't get a chance to catch them. > >-- >Oscar Salvador >SUSE Labs
diff --git a/mm/vmscan.c b/mm/vmscan.c index 7ad54b770bb1..89745cf34386 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1031,7 +1031,7 @@ static bool skip_throttle_noprogress(pg_data_t *pgdat) for (i = 0; i < MAX_NR_ZONES; i++) { struct zone *zone = pgdat->node_zones + i; - if (!populated_zone(zone)) + if (!managed_zone(zone)) continue; reclaimable += zone_reclaimable_pages(zone); @@ -3912,7 +3912,7 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int highest_zoneidx) } /* - * If a node has no populated zone within highest_zoneidx, it does not + * If a node has no managed zone within highest_zoneidx, it does not * need balancing by definition. This can happen if a zone-restricted * allocation tries to wake a remote kswapd. */
As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and reclaim from zones with pages managed by the buddy allocator") , reclaim only affects managed_zones. Let's adjust the code and comment accordingly. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)