Received: by 10.223.164.221 with SMTP id h29csp332258wrb; Thu, 26 Oct 2017 21:07:26 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QK32NhXtvrpAny7CxPnbmzTv7N3T29Dx35tJadUNE/PxFUCj9c2y35RJZD/I+BmjMXqoqU X-Received: by 10.101.65.129 with SMTP id a1mr6919222pgq.203.1509077246204; Thu, 26 Oct 2017 21:07:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509077246; cv=none; d=google.com; s=arc-20160816; b=Eh6oxNnAq5SZcka0kZogpTxxNxkmpeydYSX6tjxxPlEtzX6AkplX17YjVJQns6mZQf VpSrrhXBa9ZhHeiDavZtQOnMv4BUSZMtZk0boczvdg5M5NlT4YCXuubswE3N1TyU4GBw UOamP9bd9q8nM9QSaqoYB2CjQ2TFJGAAKD/Ok40INL1ynquNas/zw7do32OrsY+/jPpa kjtiNOTjlW+BV8EkOAu/FayYgLdklSypRAH5KEfP6Kn3XVqQkAgdtDqn1m0dHZfoX6Cq PBUKm1i/AKD/HzWuxLRMe2kMJxuDkj070zAUvMHsrp7FzDJapSe8KShewp8SlA3KHoNS pM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:from:cc:references:to :subject:arc-authentication-results; bh=rC+MSn46NKjR7qyK5Gj+JIQ1EYCNkm4bG2Kfif/Mhqw=; b=huRRq32X9AUEWRKxx/YeDgFTXiI4cMewo/3NwWnOntMiUArVEgwukFPWNotiVw9ARU DkUFrotYgg/S1hCSKud/B7B+WjDh0kwE8v75KufX+yOg+tIunseiQQO64zzBX4zccZRr oFadXM3yj32Sqv4jwbNZLbeqeBsCDAwkRgHdmhylafTGjTgjUFbTpFvRJcYCVjbAh9uN z7hlOBwDLx4rfQFBXkx5dwTAflw+3sIxW2WEi8lX4wX+GDPAMXzThNOiC569CvyJoYgs AS4iV5FHghzlBu7jAOPEh1qjtzSSsFmzDqk63a/jCp32851J1sryesda1DhkXAW9fOkB D9Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s124si4312434pgc.364.2017.10.26.21.07.12; Thu, 26 Oct 2017 21:07:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751598AbdJ0EGu (ORCPT + 99 others); Fri, 27 Oct 2017 00:06:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54494 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbdJ0EGr (ORCPT ); Fri, 27 Oct 2017 00:06:47 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9R461TF132283 for ; Fri, 27 Oct 2017 00:06:46 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dusbaaa9h-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 27 Oct 2017 00:06:46 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Oct 2017 05:06:43 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Oct 2017 05:06:40 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9R46dMP21954742; Fri, 27 Oct 2017 04:06:39 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9A4F642047; Fri, 27 Oct 2017 05:02:00 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AAA842045; Fri, 27 Oct 2017 05:01:59 +0100 (BST) Received: from localhost.localdomain (unknown [9.122.211.25]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 27 Oct 2017 05:01:59 +0100 (BST) Subject: Re: [PATCH] mm/swap: Use page flags to determine LRU list in __activate_page() To: Anshuman Khandual , Michal Hocko References: <20171019145657.11199-1-khandual@linux.vnet.ibm.com> <20171019153322.c4uqalws7l7fdzcx@dhcp22.suse.cz> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, shli@kernel.org From: Anshuman Khandual Date: Fri, 27 Oct 2017 09:36:37 +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: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17102704-0040-0000-0000-000004077010 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102704-0041-0000-0000-000020A9E710 Message-Id: <2fc28494-d0d2-9b65-aeb7-1ccabf210917@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-27_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710270052 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/2017 08:52 AM, Anshuman Khandual wrote: > On 10/19/2017 09:03 PM, Michal Hocko wrote: >> On Thu 19-10-17 20:26:57, Anshuman Khandual wrote: >>> Its already assumed that the PageActive flag is clear on the input >>> page, hence page_lru(page) will pick the base LRU for the page. In >>> the same way page_lru(page) will pick active base LRU, once the >>> flag PageActive is set on the page. This change of LRU list should >>> happen implicitly through the page flags instead of being hard >>> coded. >> >> The patch description tells what but it doesn't explain _why_? Does the >> resulting code is better, more optimized or is this a pure readability >> thing? > > Not really. Not only it removes couple of lines of code but it also > makes it look more logical from function flow point of view as well. > >> >> All I can see is that page_lru is more complex and a large part of it >> can be optimized away which has been done manually here. I suspect the >> compiler can deduce the same thing. > > Why not ? I mean, that is the essence of the function page_lru() which > should get us the exact LRU list the page should be on and hence we > should not hand craft these manually. Hi Michal, Did not hear from you on this. So wondering what is the verdict about this patch ? - Anshuman From 1582017023198850361@xxx Mon Oct 23 03:23:23 +0000 2017 X-GM-THRID: 1581706618333065037 X-Gmail-Labels: Inbox,Category Forums