Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbdCCJF3 (ORCPT ); Fri, 3 Mar 2017 04:05:29 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48173 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751476AbdCCJC0 (ORCPT ); Fri, 3 Mar 2017 04:02:26 -0500 Subject: Re: [RFC 00/11] make try_to_unmap simple To: Minchan Kim , Anshuman Khandual References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <86c860e4-c53d-200a-f36a-2ed8a7415d5d@linux.vnet.ibm.com> <20170303021118.GA3503@bbox> Cc: Andrew Morton , kernel-team@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko From: Anshuman Khandual Date: Fri, 3 Mar 2017 11:09:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170303021118.GA3503@bbox> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030305-0048-0000-0000-0000020D3E6C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030305-0049-0000-0000-000047A62C72 Message-Id: <96e43a6e-182f-2bda-0214-ab3a50946f29@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-03_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703030054 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 21 On 03/03/2017 07:41 AM, Minchan Kim wrote: > Hi Anshuman, > > On Thu, Mar 02, 2017 at 07:52:27PM +0530, Anshuman Khandual wrote: >> On 03/02/2017 12:09 PM, Minchan Kim wrote: >>> Currently, try_to_unmap returns various return value(SWAP_SUCCESS, >>> SWAP_FAIL, SWAP_AGAIN, SWAP_DIRTY and SWAP_MLOCK). When I look into >>> that, it's unncessary complicated so this patch aims for cleaning >>> it up. Change ttu to boolean function so we can remove SWAP_AGAIN, >>> SWAP_DIRTY, SWAP_MLOCK. >> >> It may be a trivial question but apart from being a cleanup does it >> help in improving it's callers some way ? Any other benefits ? > > If you mean some performace, I don't think so. It just aims for cleanup > so caller don't need to think much about return value of try_to_unmap. > What he should consider is just "success/fail". Others will be done in > isolate/putback friends which makes API simple/easy to use. Right, got it. Thanks !