Re: [PATCH v2] mm/mmzone: Introduce a new macro for_each_node_zonelist()

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

 



On 18.04.22 16:05, Mike Rapoport wrote:
> On Sat, Apr 16, 2022 at 10:20:35PM +0900, Donghyeok Kim wrote:
>> There are some codes using for_each_zone_zonelist() even when only
>> iterating each node is needed. This commit introduces a new macro
>> for_each_node_zonelist() which iterates through valid nodes in the
>> zonelist.
>>
>> By using this new macro, code can be written in a much simpler form.
>> Also, slab/slub can now skip trying to allocate from the node which was
>> previously tried and failed.
>>
>> Co-developed-by: Ohhoon Kwon <ohkwon1043@xxxxxxxxx>
>> Signed-off-by: Ohhoon Kwon <ohkwon1043@xxxxxxxxx>
>> Signed-off-by: Donghyeok Kim <dthex5d@xxxxxxxxx>
>> ---
>> V1 -> V2: Fix a compile error
>>
>>  include/linux/mmzone.h | 36 ++++++++++++++++++++++++++++++++++++
>>  mm/hugetlb.c           | 17 +++++++----------
>>  mm/mmzone.c            | 17 +++++++++++++++++
>>  mm/slab.c              |  7 ++-----
>>  mm/slub.c              |  8 ++++----
>>  mm/vmscan.c            | 16 ++++++----------
>>  6 files changed, 72 insertions(+), 29 deletions(-)
> 
> Even counting the comments this does not look like a great simplification.
> 

I tend to agree.


-- 
Thanks,

David / dhildenb





[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