Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbdCCOMB (ORCPT ); Fri, 3 Mar 2017 09:12:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50040 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbdCCOL5 (ORCPT ); Fri, 3 Mar 2017 09:11:57 -0500 Subject: Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu To: Minchan Kim , Andrew Morton References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <1488436765-32350-7-git-send-email-minchan@kernel.org> Cc: 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 18:06:38 +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: <1488436765-32350-7-git-send-email-minchan@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030312-0048-0000-0000-0000020D6B72 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030312-0049-0000-0000-000047A70A72 Message-Id: <54799ea5-005d-939c-de32-bc21af881ab4@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-03_10:,, 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-1703030120 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 750 Lines: 17 On 03/02/2017 12:09 PM, Minchan Kim wrote: > ttu don't need to return SWAP_MLOCK. Instead, just return SWAP_FAIL > because it means the page is not-swappable so it should move to > another LRU list(active or unevictable). putback friends will > move it to right list depending on the page's LRU flag. Right, if it cannot be swapped out there is not much difference with SWAP_FAIL once we change the callers who expected to see a SWAP_MLOCK return instead. > > A side effect is shrink_page_list accounts unevictable list movement > by PGACTIVATE but I don't think it corrupts something severe. Not sure I got that, could you please elaborate on this. We will still activate the page and put it in an appropriate LRU list if it is marked mlocked ?