Re: [PATCH 03/10] mm: use __SetPageSwapBacked and dont ClearPageSwapBacked

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

 



On Tue, Apr 05, 2016 at 01:44:16PM -0700, Hugh Dickins wrote:
> v3.16 commit 07a427884348 ("mm: shmem: avoid atomic operation during
> shmem_getpage_gfp") rightly replaced one instance of SetPageSwapBacked
> by __SetPageSwapBacked, pointing out that the newly allocated page is
> not yet visible to other users (except speculative get_page_unless_zero-
> ers, who may not update page flags before their further checks).
> 
> That was part of a series in which Mel was focused on tmpfs profiles:
> but almost all SetPageSwapBacked uses can be so optimized, with the same
> justification.  Remove ClearPageSwapBacked from __read_swap_cache_async()
> error path: it's not an error to free a page with PG_swapbacked set.
> 
> Follow a convention of __SetPageLocked, __SetPageSwapBacked instead of
> doing it differently in different places; but that's for tidiness - if
> the ordering actually mattered, we should not be using the __variants.
> 
> There's probably scope for further __SetPageFlags in other places,
> but SwapBacked is the one I'm interested in at the moment.
> 
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
> ---
> Sorry, Mel did give
> a year ago, but the kernel has moved on since then,

Still looks good to me so

Reviewed-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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