Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp19903pxv; Wed, 21 Jul 2021 14:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJcF5C1J6Zo8NpZ9/7r4lgDpCrbEoxh05Ollsloquhs6UwARqT1pCChg3br3jiUlWPHRIv X-Received: by 2002:a17:906:7151:: with SMTP id z17mr41563918ejj.166.1626902247136; Wed, 21 Jul 2021 14:17:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626902247; cv=pass; d=google.com; s=arc-20160816; b=0D8kJ3cK57TurJtQo1q/Wuk/gtWy4xhAe/9moy1WkoS1y7rYZQUm5tmp3RbZHqXkvx 6kcI5CR8eRX3sCA+LykMkksXtdVqRqsL9GuEzHccE7uI6dsgzkyfhCPOKz31HqiHPs84 i6nn1NhNtbm03Sntbj8F7bgf4fPBTj0Ka+V1l2mP2uzKSUvHrVA11qzCMdg0j92O7mi2 bwJOmdo9l2vlHjwtpyMj0FfDnyh5MkeC4GErQLzIUbNvC2TZr8eWXqwYYRwfQnc2gm7M AXNlynhesLvkZdtcU4TLk//VrVRbfpRauefV8sCsOrbvaXSCESZ3Q0D+J5riHLhKMvsc 1U2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=f4upZfoqlA5nOOrM4qFtsexv2i01AUHSahH31s1e25k=; b=fcezYUxFkLon/Chsbldew/6d1SczdWXYNhrwOAWhSGlnawe8u4sPdllt2OgymaAH72 t6Js7V5DYdkki3BP+IBh21kOOQdZQbAqgwj81y44qnl6m/yBtlOscT5YJg2gabRL3yaN R/bpC9eIfV/m2nlmzYDbM2veIMYw5EdcWVULAPcsYVyHZ1CQEU0vxn09Uji5/RywcMqz HBHSrt1wj4jTKNYZYl6aNCOIgTucNIHxoqLH88S03OAlG3BERKyii9b6tYKgn0gETpNt zJa4fSiDWRaIppq/GRvRDu0Cy1b5zLBxbSrC4Up8IfRXN7upwVhgyh06xhebFe+IQq8l mJzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=AJ8nnt2W; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi15si32581039edb.459.2021.07.21.14.17.03; Wed, 21 Jul 2021 14:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=AJ8nnt2W; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbhGUUe5 (ORCPT + 99 others); Wed, 21 Jul 2021 16:34:57 -0400 Received: from mail-bn1nam07on2080.outbound.protection.outlook.com ([40.107.212.80]:48021 "EHLO NAM02-BN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229764AbhGUUe4 (ORCPT ); Wed, 21 Jul 2021 16:34:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfAAaU6tunjNRlsUrevD+pNY32xEDnf1OZTw4RhP1mdayOcZEFiodKBy8ovAVuW0FgZ4jsC3GHsAA1XIprwoISqgomduoCM8oyfnKaMjm9GwrQnXC0p/Hb/EUimuHl/2MOnYD/RGXr0XmZYwJEb74hIU5sez2KQm/XbNu/gWc8sZ5gbonhGx9QC1syo33mf+PBdNSpJho+H566dyJveCdx1CQfJSio4boQL9AQU9H842vDpPCc64JfouRTW0bKk37unhhj97uj6M+UFHk6HmTz1YAyhhUNC5Il4crAvqBxOeOe+DbxQ0CdBA4by7k6A7o3u70Wu628aAjgpeuHbFhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f4upZfoqlA5nOOrM4qFtsexv2i01AUHSahH31s1e25k=; b=fPw9WvDUlWIHj0O3SyywdxHo62Qmrfv7bCWm1ehAhd07/OIEsKIuEsR0m+ryjtEP6eAt2J/H454bXeoY363wo4p99u6TI54NqpNqcQZb8zUW1f6MyXxw6/KXUM5rVQsrnETVGbNfvEMKBu/m1V8U8u8uRmiuZBBmBPl6KS944/3tGQ5Nf6e6/2ceCoOB9nHW/HU4HeTIZ8SX/TnwgYgFuDqek+dRx0ybkraCVB7N/wxPG7LBlEakziKPp8JoXPeE+CDV3vyy7sv+yHUhtl3p/E9EJtdqD6HLz0X2JjGna/RjQtBWyeF/I6HvZ5J6S0T3lbLS+b0rGyJxyCOUr2ybKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f4upZfoqlA5nOOrM4qFtsexv2i01AUHSahH31s1e25k=; b=AJ8nnt2WmmrRnsNwHK0EexEbZd+IYteGZViSNeevzlcfQCESV8BcEiaR9BQT2TRgfwOGLglZeDQ5L98/ggMqTzeal+yee9QSGjRmbx4nDIIN9PYMifQ311/VWxOzT6yvojxrZXVCZmzvhKq8kSUWCv3GwIffleDR+EO7oHqs09S3BEFrALBaLahz8ZSbVSS07NelyWXrBCKAIunhlgJaUhFYVGMTQP82L5TH0iLMAtclk0BFpJlbSlkBKQk8TrONbE7Exk69PXlselFnygQjzVfHx9qX8j9OUu8L8Sn2GL+qplJOR3EbgpBIglZvnET1LTAtTRi/ZdPGUMuO56PkjQ== Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) by MN2PR12MB4376.namprd12.prod.outlook.com (2603:10b6:208:26c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Wed, 21 Jul 2021 21:15:31 +0000 Received: from MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::dcee:535c:30e:95f4]) by MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::dcee:535c:30e:95f4%6]) with mapi id 15.20.4352.025; Wed, 21 Jul 2021 21:15:31 +0000 From: Zi Yan To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Hansen , Yang Shi , Greg Thelen , Michal Hocko , Wei Xu , Oscar Salvador , David Rientjes , Dan Williams , David Hildenbrand , Keith Busch , Yang Shi Subject: Re: [PATCH -V11 6/9] mm/vmscan: add helper for querying ability to age anonymous pages Date: Wed, 21 Jul 2021 17:15:25 -0400 X-Mailer: MailMate (1.14r5812) Message-ID: <0D3C3C4C-C25A-484F-A486-0C2ED5737578@nvidia.com> In-Reply-To: <20210721063926.3024591-6-ying.huang@intel.com> References: <20210721063926.3024591-1-ying.huang@intel.com> <20210721063926.3024591-6-ying.huang@intel.com> Content-Type: multipart/signed; boundary="=_MailMate_DC768998-427D-4856-853D-8B884CC14133_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-ClientProxiedBy: BL1PR13CA0117.namprd13.prod.outlook.com (2603:10b6:208:2b9::32) To MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.2.55.80] (216.228.112.21) by BL1PR13CA0117.namprd13.prod.outlook.com (2603:10b6:208:2b9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.7 via Frontend Transport; Wed, 21 Jul 2021 21:15:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45b97b3d-ff06-4543-219e-08d94c8cac10 X-MS-TrafficTypeDiagnostic: MN2PR12MB4376: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3hpQ3ocXzfj3b5ReQtT8C+oXm47IYLRP8s1SF03kPpJyZ6ZPv+JENsaN9JIVhd93z0LMNKyz0OVeY9ylZeK4C8n4jsTyYxfwyf2yDM/a8VwKf9BvczuF2SlnfZSuMcUUPdNHGNC8CTesF6dJvz4o4WxnSOJdrSMZAtqZ3AtEzgI5OslqRpL+I5A76xx9lKwtY78qP4DyWRLfj5e2YpqrcylsnrWB2NFypNvVRCZHT0cWVJ4QqllcJaCDyUv6v5oIIeM3FyitED0xc50KxlCxsnk4MJkBirWReyraT9mTkOWdT3c4H6ly8i2/36u1XVs0yWR0y4sdSybeCxfNUhQIQpnb+8fN0bCi7xxWrSlwD8yPNXN5/xaGzGkbAenp9nzN0GXbGmdvRa/gVHWSoOc6tyHjeBgqzUP6PcKbRP/u9e9wNWm0x2PNp+Ry39/fe6YP4nXfrufk0yHHlRzefxsZHCdZdd/LSDq580KyQtRu/DPEjvOG2N9Ryz1YjSBJIVpeAfcJOhqRucDWeGFU/+nr7e5luNX0C44FSSe09zJpYEJ4BSU7If9YNUz9hTAlNaA5gbtph3DO/YcagX5Ao1E/hJgEUCQICwxWBp0WQnHfipnY6kGtD/KViV4gNeMoCp9IraATG+54S/1FKktt1Zv/d8vcAmPN9OsOSuzUDvAfa0L3/+mmPxBw79sV3JVx4PKQckAIVtn79p+3CRADty+InTO3QjLePVPEVSTwAEHorNBGlBy/mREGGSu6Ljz9E0U49Sbuy8NLLK13KfO2ys6aTAO0gMcg+R4TU3ObEdoML7W9zDrtsodShOJSiQZVEhca X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3823.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(136003)(39860400002)(376002)(396003)(366004)(966005)(6486002)(2616005)(54906003)(6666004)(6916009)(8936002)(8676002)(21480400003)(36756003)(66556008)(66476007)(478600001)(66946007)(86362001)(83380400001)(16576012)(53546011)(38100700002)(7416002)(316002)(5660300002)(26005)(186003)(4326008)(2906002)(956004)(33964004)(33656002)(235185007)(45980500001)(72826004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R3llMGc0ZlkzTUxEUU1sdDdaOFovWDduZER5VXlKSUNSa0I0bE9uaE4yT2My?= =?utf-8?B?bWsvTmZ0QkdDa0R3NU9qejdEbVhwY05kM2lVYTIwd0F1UHMzcEY1NXJ3aGVD?= =?utf-8?B?MnBrcThCcy9oTHk4ajh0clBBSVZSRjl1MlZTTEhPMEVYV2tNNkJyUHYwcmVo?= =?utf-8?B?ODdtTkFmUE1tc2tnS1FNMm1kNlhpSEVlOCt0Q2ZzTmEyK0F4UG1DeFN0Sncv?= =?utf-8?B?cTRsd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CR0k4cUJZ?= =?utf-8?B?K1ZmcG01VkJDTUJENWYzcm0vNm5DMlo2dWpoNkJUVHg1WmxjU2luTDVhRm1E?= =?utf-8?B?RzNsQjZPeHROWVYrS000TTZyNXpYb2dUQXVKZXVzUnl6aUhVZUE3czJOWi9W?= =?utf-8?B?bVhTajN4QjZ3TzVTeEJGUnFzMWs0TmFwUEMyZG5lb0ZlVWdPcVMyWThKQUVF?= =?utf-8?B?QWNnUGFXQkQzUFJDSkVsaHRLRVAvSEcyOFUwREFnU04zMTdUYjB5RHJvQUIx?= =?utf-8?B?NGlub1o4TWtBbG1IajZCZzh4MDRNT0dySlNiZUw5ZmZVRFJ2aTJZelk2KzVu?= =?utf-8?B?NTNpWkJTQ1FPcElqOHNLaGdWWS9sTHE0K1VCdml0VnRreEhwcGZRcmE5dHNU?= =?utf-8?B?c0xaZU5tWWxjNmVvSEFGTVNrdjNvb0pNRkdXYjJIRWs4Z3cwOUJsdzdrZExv?= =?utf-8?B?UzlnMnNpYjlFWitmUk51bE82TVROZzZzaWk3N0tJNVQxMzBmTytyTlVpcmN1?= =?utf-8?B?cFJpRDcyWGxpNkc5dUY5KzlJRTh4YXMzT040ZkJRTWZGWEZEU21wVnRYSUxT?= =?utf-8?B?VUJ0M1J4eVU2VlFPZnlUNW9qTTIwSEhBdk9HSmcybzdKR05PTXNGRzA0SThD?= =?utf-8?Q?SDwzuZ8pM4RLgnTwbrNvn1rxAjGiDlRVo+aBULb?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45b97b3d-ff06-4543-219e-08d94c8cac10 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3823.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 21:15:31.7125 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XkoL8MalEhDWvEWQyclqiuggQpU1oQp7R+X7YyxOHEsjEHyI7Gg/RCHmf0g0WAAq X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4376 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_DC768998-427D-4856-853D-8B884CC14133_= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 21 Jul 2021, at 2:39, Huang Ying wrote: > From: Dave Hansen > > Anonymous pages are kept on their own LRU(s). These lists could > theoretically always be scanned and maintained. But, without swap, the= re > is currently nothing the kernel can *do* with the results of a scanned,= > sorted LRU for anonymous pages. > > A check for '!total_swap_pages' currently serves as a valid check as to= > whether anonymous LRUs should be maintained. However, another method w= ill > be added shortly: page demotion. > > Abstract out the 'total_swap_pages' checks into a helper, give it a > logically significant name, and check for the possibility of page > demotion. > > Link: https://lkml.kernel.org/r/20210715055145.195411-7-ying.huang@inte= l.com > Signed-off-by: Dave Hansen > Signed-off-by: "Huang, Ying" > Reviewed-by: Yang Shi > Reviewed-by: Greg Thelen > Cc: Michal Hocko > Cc: Wei Xu > Cc: Oscar Salvador > Cc: Zi Yan > Cc: David Rientjes > Cc: Dan Williams > Cc: David Hildenbrand > Cc: Keith Busch > Cc: Yang Shi > Signed-off-by: Andrew Morton > --- > mm/vmscan.c | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > LGTM. Reviewed-by: Zi Yan =E2=80=94 Best Regards, Yan, Zi --=_MailMate_DC768998-427D-4856-853D-8B884CC14133_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmD4jm0PHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKkmkQAIrbS8M+mdUtWz9H8bz/ciFdYY0c3wcYpbUy MbIrUMy5v54ovyJSekDARCOlq9Db3CMCzkbRhunSG9jVT/1qFBMbY6g4mp1ZF39e OSr0jkONfvMuRMz41acvAr+xaB1nqxQuLjYtzgQW9COIBAJrpSmeMkYacV8NvKqX hcUaX+9In33xyNxd9QJUeAnn3MZswzsN1drMChZUg0vo70ow24R64o6OVbbdnixn Z/d+JKVbb/pqbIg57N2BTX5IZK0acZlvyyw8U6ntN7EMLreLh0UdtuHZVzBd1w+m gnReqZjrqIFqVFlD2HB+v51mFg00I/YlpeMGNfAepxzheYaeyfW00XACxrxcWRZW 94QWBU2L2C2SZLaJHC75s90dAC+fXxNxqYBRexjm9+8IsEreEdj0AwVaMDHr5XJt CKKnfJ7YSXKlxlvUYBFyx21ljSXg8aDWZzDBbOyrjBBgNZhLl3uk+PZyTDBx/8jT +1YpljPw7ndM0oj99rm4hKlOVMMr3JD0AciC06CLAmXEX8MCiCrfgOeNdzG+A/fx h+1LKwAg2KAFTx97xYq52MKUvqNJ9qGqRa8Vvap6ufV4FEvGlB05lvSSwuF+AsAy VWQLMa8QrJupZfKXjenzRwvdCuot7bgtZe9r/3DeEHPacKsIfpFLpiT9rH+TEgCb PyGHYvWf =oejz -----END PGP SIGNATURE----- --=_MailMate_DC768998-427D-4856-853D-8B884CC14133_=--