Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934038AbcDFJwW (ORCPT ); Wed, 6 Apr 2016 05:52:22 -0400 Received: from outbound-smtp04.blacknight.com ([81.17.249.35]:56020 "EHLO outbound-smtp04.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933904AbcDFJwU (ORCPT ); Wed, 6 Apr 2016 05:52:20 -0400 Date: Wed, 6 Apr 2016 10:52:15 +0100 From: Mel Gorman To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Andres Lagar-Cavilla , Yang Shi , Ning Qu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 03/10] mm: use __SetPageSwapBacked and dont ClearPageSwapBacked Message-ID: <20160406095136.GC4773@techsingularity.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1314 Lines: 31 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 > --- > 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 -- Mel Gorman SUSE Labs