Re: [PATCH] mm, page_alloc: skip zone who has no managed_pages in calculate_totalreserve_pages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 14, 2018 at 08:48:21AM +0100, Michal Hocko wrote:
>On Wed 14-11-18 07:43:41, Wei Yang wrote:
>> On Tue, Nov 13, 2018 at 10:07:58AM +0100, Michal Hocko wrote:
>> >On Tue 13-11-18 08:16:44, Wei Yang wrote:
>> >
>> >No, I believe we want all three of them. But reviewing
>> >for_each_populated_zone users and explicit checks for present/managed
>> >pages and unify them would be a step forward both a more optimal code
>> >and more maintainable code. I haven't checked but
>> >for_each_populated_zone would seem like a proper user for managed page
>> >counter. But that really requires to review all current users.
>> >
>> 
>> To sync with your purpose, I searched the user of
>> for_each_populated_zone() and replace it with a new loop
>> for_each_managed_zone().
>
>I do not think we really want a new iterator. Is there any users of
>for_each_populated_zone which would be interested in something else than
>managed pages?

Your purpose is replace the populated_zone() in
for_each_populated_zone() with managed_zone()?

If this is the case, most of them is possible. Some places I am not sure
is:

    kernel/power/snapshot.c
    mm/huge_memory.c
    mm/khugepaged.c

For other places, I thinks it is ok to replace it.

>-- 
>Michal Hocko
>SUSE Labs

-- 
Wei Yang
Help you, Help me




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux