Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbdCCEUb (ORCPT ); Thu, 2 Mar 2017 23:20:31 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:57713 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdCCEUa (ORCPT ); Thu, 2 Mar 2017 23:20:30 -0500 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Fri, 3 Mar 2017 12:04:16 +0900 From: Minchan Kim To: Anshuman Khandual Cc: Andrew Morton , kernel-team@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko Subject: Re: [RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu Message-ID: <20170303030416.GF3503@bbox> References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <1488436765-32350-5-git-send-email-minchan@kernel.org> <65fd1dd1-7ca4-6610-285c-09436879d8ed@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65fd1dd1-7ca4-6610-285c-09436879d8ed@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 577 Lines: 18 On Thu, Mar 02, 2017 at 08:21:46PM +0530, Anshuman Khandual wrote: > On 03/02/2017 12:09 PM, Minchan Kim wrote: > > If the page is mapped and rescue in ttuo, page_mapcount(page) == 0 cannot > > Nit: "ttuo" is very cryptic. Please expand it. No problem. > > > be true so page_mapcount check in ttu is enough to return SWAP_SUCCESS. > > IOW, SWAP_MLOCK check is redundant so remove it. > > Right, page_mapcount(page) should be enough to tell whether swapping > out happened successfully or the page is still mapped in some page > table. > Thanks for the review, Anshuman!