[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/5] mm/page_alloc: move pages to tail in move_to_free_list()
 
- To: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
 
- From: Vlastimil Babka <vbabka@xxxxxxx>
 
- Date: Tue, 20 Oct 2020 19:20:22 +0200
 
- Cc: linux-mm@xxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx>, Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>, Alexander Duyck <alexander.h.duyck@xxxxxxxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Scott Cheloha <cheloha@xxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>
 
- Delivery-date: Tue, 20 Oct 2020 17:20:30 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On 10/5/20 2:15 PM, David Hildenbrand wrote:
 
Whenever we move pages between freelists via move_to_free_list()/
move_freepages_block(), we don't actually touch the pages:
1. Page isolation doesn't actually touch the pages, it simply isolates
    pageblocks and moves all free pages to the MIGRATE_ISOLATE freelist.
    When undoing isolation, we move the pages back to the target list.
2. Page stealing (steal_suitable_fallback()) moves free pages directly
    between lists without touching them.
3. reserve_highatomic_pageblock()/unreserve_highatomic_pageblock() moves
    free pages directly between freelists without touching them.
We already place pages to the tail of the freelists when undoing isolation
via __putback_isolated_page(), let's do it in any case (e.g., if order <=
pageblock_order) and document the behavior. To simplify, let's move the
pages to the tail for all move_to_free_list()/move_freepages_block() users.
In 2., the target list is empty, so there should be no change. In 3.,
we might observe a change, however, highatomic is more concerned about
allocations succeeding than cache hotness - if we ever realize this
change degrades a workload, we can special-case this instance and add a
proper comment.
This change results in all pages getting onlined via online_pages() to
be placed to the tail of the freelist.
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
Acked-by: Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx>
Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>
 
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
 
 
    
     |