Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp18638pxv; Wed, 21 Jul 2021 14:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpo1uIT2I15NYjKK0nJekkxgh0GTlOQwOx+cHLqQmBiLt5da44Ns8CRc1hgUmPKBVLDjDz X-Received: by 2002:a5e:9309:: with SMTP id k9mr27633034iom.207.1626902096797; Wed, 21 Jul 2021 14:14:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626902096; cv=pass; d=google.com; s=arc-20160816; b=DN0XczaXsxOe1N8ohd6DpgYLpJUlUqEXr5TLP4nPLRxWQCuYZ66vzLDgiHOAc4Fzhp VAVKhExaMc+b8PuuM9o0xN6TnuEENxnG6U+Q+QBPn+YEQKNCsc0Nyj+FGxzvhdsYxgLC nRwWu54odLG+IVBPi4KM7eZ8acyV/lBCxXjmju21jKMc+UV/eBUEKUJK0bbX5hnUsVx6 Il+TOl31SFiO/Z0dMUwvfXFUSfMzp/WhKBBmi6E7hIpE5+FIhe3x8RD7MYqSQX5dIRlA +85BUShuLwgFUkhro4nybYYbgtVlKNVcJYag8DcUP8PsuGui/z7qyr04e0lnIF9c7SGl yR1g== 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=BZF2OxVgK0bHKenW9Ki2OK19f7XRsvcDQPkiId3ZQCQ=; b=LwE0xhep/hN1ACeZyjU/utSy4Zo8OXChZwiegBxFlSIL4w0poXESbNtnCaezoAOOMq 4RLtJUtPprEmSMLzuKcIIZb8jN+W4gZ2F8i5ISc2NLr2oKAiX6VrAiVWKKccLly7TNSa ZodtRGXdm7j85vBc63rYjZ4MGO3DhWo2dTA0lshN4k1CofPay9QyNr2nYQbL4qLjXydX RlLzjLsi7KJ9K2/bO4yVzCtMQDbE+2F94MijEl+hLOEaWi8MyfSWKLj3r1bkOrjIJwdt x5CRb+V2/58SW3WntmuHK67gJ+zFnV/Xy7Cz10Z32Ctr86mUGtCBiubtN5cYdap5EO8z +6UQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=A0cx9B4y; 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 a9si27586543ilr.103.2021.07.21.14.14.45; Wed, 21 Jul 2021 14:14:56 -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=A0cx9B4y; 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 S229820AbhGUUd3 (ORCPT + 99 others); Wed, 21 Jul 2021 16:33:29 -0400 Received: from mail-mw2nam10on2088.outbound.protection.outlook.com ([40.107.94.88]:22913 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229516AbhGUUd2 (ORCPT ); Wed, 21 Jul 2021 16:33:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dI/M3UxfsfKDIRdJL9pR37YawzxL0MjreJNB+iEcpjFPWKgdsPQNY+ij/jKaVRQNYRr2SFPegVbeznkVFuFsy7dofMhD1pX6ww188HzQC23wkYxfLZu7WKnx2N15EanN5hhJ9JDp2sPTCyuis4E28DdlD+rsnqI/Wma6rwML6cTgu5GqGhGPAu7pGdoHYIz2LjhHsEr1V2jJaJ2SD/vkiyyLNr4fXSfIj2wX0mb2ZqmQShTUbYYlel4EuV05BgrFBSaJ1F+EE15zw1NfyajC6uHTIhlS/5wL1nk58m2GNAK5eKBJmPkc738nSuKTBnhyh1PL78BwYPMkyytQqiZURQ== 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=BZF2OxVgK0bHKenW9Ki2OK19f7XRsvcDQPkiId3ZQCQ=; b=UVijVG2PhWs/cyVb8XLbeLRTvUCv9rXZZuDmmx2053ZQAlCZneKqxtBcYla7HECogeeyaCYu/bW2u1hf5alJDbw+rbZaS13j25RRSV6ot1YCqZK3IZtcLyBhc8UmQ9WRiY/4wzxH/Sq/CCZLeDq6fgse3Wot1BfG0TI1/ia1Q4DCgB13aqa6DS3BpSPVAk1ohmz9wqQrZggf6BCL5C0zXW8HCmEtMkp/Lb9hmxNIBlk1PiJwgSDKxIcCe6Ljbx2Vy/fSmexxcrmH6Ds+1GAPRz/mZldP2fAeH8r0FLQoPuGS4tF/Y1tyr8JNqjf6l2rjFqExJMSaRjcS2KSdWr3q4A== 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=BZF2OxVgK0bHKenW9Ki2OK19f7XRsvcDQPkiId3ZQCQ=; b=A0cx9B4y/DaVHr/ERRtiXuKXdMKGTaxbGZTPfPMUuQzwImRb6GCQhKnCYyLdoA7PybB7bQ3PBeoGxxlL9CTN06kvhe8Ke+DdXkC0DKfBURe+uo2aKeYsj5g7KfzoLnI5IodeEDQ/C+UiWD10LGgsBZoxoqOuvxUoh1M20df7oeQEnNI9T0lGYe0Lc6cN5BDL2LmEjAJO5+ecwvNAeQHSTX7q6QTKYmWP8WjMs4QA/MhpUGZ1eM8S9MiYU/r7lVyOHx9SbAsEdOzwHruoh8CujdLJFafVsOfHPa5HafbcnCnMBXE4ic3PVbM58rk0rLZZKJUmCsWGJAIcM7tUm3R2oQ== 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:14:02 +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:14:02 +0000 From: Zi Yan To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Shi , Dave Hansen , Yang Shi , Wei Xu , Michal Hocko , David Rientjes , Dan Williams , David Hildenbrand , Oscar Salvador , Greg Thelen , Keith Busch Subject: Re: [PATCH -V11 5/9] mm/vmscan: add page demotion counter Date: Wed, 21 Jul 2021 17:13:56 -0400 X-Mailer: MailMate (1.14r5812) Message-ID: <6B46E3AD-1504-4F27-B4D7-10BB27479BE4@nvidia.com> In-Reply-To: <20210721063926.3024591-5-ying.huang@intel.com> References: <20210721063926.3024591-1-ying.huang@intel.com> <20210721063926.3024591-5-ying.huang@intel.com> Content-Type: multipart/signed; boundary="=_MailMate_B8B841A2-2B85-4DDE-84F3-4832B9BDBF41_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-ClientProxiedBy: MN2PR10CA0036.namprd10.prod.outlook.com (2603:10b6:208:120::49) 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 MN2PR10CA0036.namprd10.prod.outlook.com (2603:10b6:208:120::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22 via Frontend Transport; Wed, 21 Jul 2021 21:13:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8d32ffd-1d9f-484b-06d9-08d94c8c76e9 X-MS-TrafficTypeDiagnostic: MN2PR12MB4376: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2e+OfDdEenBohzyEEPO0cFB55cxRScB7cQBI/i8vFXZzNBhxgkDFRMTSxGmN7m+jQx87NAscoWHfBvvvscKxgKS0hZjbkWL+dSppi3k+H+HTQzWegOg3VbmWBiNLLijPk2KoYbc19FeAox3JTWIosErG3R4+Argy0vBz+HhlQ7F8MxpN7B/aQ7U5uO+XFimYZrR2x0N4JUB+CcZAcXjT13BQMhRIshu90B8vJatcFTeiDsGDR9CztXZLYRpSGKe4x5Cl/WNflG/stnWsDgqkuAcF0z970/OfTDQmS7QgDM4BEod4/Shzfs/fUEqqUcq+zP69gTgM5uaxlDIyjH4fjEtNX2i2KXEMnYuZkIbQ9n2jE5XhyXkURcaOvWqA03hFLM5rS4tPg463XCRanMFE5ss6ZMGqZqHd2gYN67mVgra6BWYNcV56L3mOyrAdUVEDekunZtu3zDCOtq9QLpyP3Tarl8d/frdgGS7PYj0g/nlYQc0poJKz+aJe7Ut1kRhwaKsaGV1wlRxEumhZVEbDX9KxhyIlpF1VArSXjbzPWUwR9CUqZl+HMRgynqdVjMrDXiuYE0zn5YoZrin+6sM091Lvz7i0pe/jnXWAu/FbtKPfYFHdtPIWa29AvyIf11PAE3viLBIX4wj3jcZOurOXGvgyxS3R6tXubcHM4LePIapu4G9yE3ZauriKbIbtoBLkvslOc5sHQxpc5GBj6cjrY4wGBY6pCQFj10G5JiAsf99sDj2RMF7hVJfGMy9RIWk23H6wcmEkvZ8v9jCgQuMMXzV8HIRSdvKifp7i0GK0q0o= 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?cEZTbWs2SzdrMUFJUnNJUUtXek9NQU1pM2grN3ZJV2V3d2EvUWs1Mll3Mi9t?= =?utf-8?B?RTRESG9JUHIxNzJaRFE0RVpMK3pwdHFmUUVlbEFQbDc5UmlaRDdUbUNjRXZN?= =?utf-8?B?YnFUTVJHYXVyM2drUFMraytic2F1U3Q1ZEtDWUxsUWVlYnFSY0FZRUxFazBC?= =?utf-8?B?QXYyUHlZa0krZ1lmR2ZMamEwU1RoQWEweDVuV1E3ZXYvZ1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Y2hFcmdvcitTZ0FlWmwveEdo?= =?utf-8?B?ZkY0UmUzdHJaKzhKckxhVXgyaUtkRXR4NnVwLzZ2ZU4vY09YK0pRR1ZVTjJL?= =?utf-8?B?cm5XNGF6Z2liTXRzU2tNdHBUUWEwTW9RY2JuYWQyTnJoeW9tNUlIRTU3TDQz?= =?utf-8?B?MXVzYlF3L2l1YlhhUk4xQmEwZ2U1QTEyRWRwMUZ6TEF3bytuMnM2OCsxWmpm?= =?utf-8?B?TG8zd2V3UUZMMXNWWTVMUm5PWHR4cTJheG90aklON1FXRzdDS3FwOE53S2NV?= =?utf-8?B?ZUovVXkvUEdaOHozazlCUHh3TzNTYmRlOWZSSW5hV1htRm5pRHEyTGVyVFNw?= =?utf-8?B?MzZwMS9TcHJETEhLZVJLM3k0THFrOFVwN1hicW5NcTVMMGxZUDJSMkliSUNH?= =?utf-8?B?SjdRbDhYVTFZYlBtT01HZk45bVRzWWhYdU1tMUFyak1iYzl3bHlTUnJqZ0Ja?= =?utf-8?B?aEN1MW1hVkFQcTdSY2pBb1FwV1I5dk5GWVh4L3UyUjNxVHlqY0FkVWtlbmlF?= =?utf-8?B?SzFUWlZOZHhQZFAxUGQ3T2U4WjdDTUxqOGhXR2N6Q3gxWnVSbDQ2NndSWnRo?= =?utf-8?B?NEp3Z3pWb0tvWjhuRVFIY21XTFJtQ3NseHhDclUvV2wzRlNrdy9qR0Jvbktr?= =?utf-8?Q?lX2V+br0gdNFfUIwbmC1klLQsQu6edTUjLqYVRK?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8d32ffd-1d9f-484b-06d9-08d94c8c76e9 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:14:02.4970 (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: TBY6rGRJBiZs3I748ipzVXJ4184Z5L9jM3E6Fcxx4/gjtI70I27qCcidjdO+He5H X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4376 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_B8B841A2-2B85-4DDE-84F3-4832B9BDBF41_= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 21 Jul 2021, at 2:39, Huang Ying wrote: > From: Yang Shi > > Account the number of demoted pages. > > Add pgdemote_kswapd and pgdemote_direct VM counters showed in > /proc/vmstat. > > [ daveh: > - __count_vm_events() a bit, and made them look at the THP > size directly rather than getting data from migrate_pages() > ] > > Link: https://lkml.kernel.org/r/20210715055145.195411-6-ying.huang@inte= l.com > Signed-off-by: Yang Shi > Signed-off-by: Dave Hansen > Signed-off-by: "Huang, Ying" > Reviewed-by: Yang Shi > Reviewed-by: Wei Xu > Cc: Michal Hocko > Cc: Zi Yan > Cc: David Rientjes > Cc: Dan Williams > Cc: David Hildenbrand > Cc: Oscar Salvador > Cc: Greg Thelen > Cc: Keith Busch > Signed-off-by: Andrew Morton > --- > include/linux/vm_event_item.h | 2 ++ > mm/vmscan.c | 5 +++++ > mm/vmstat.c | 2 ++ > 3 files changed, 9 insertions(+) > LGTM. Reviewed-by: Zi Yan =E2=80=94 Best Regards, Yan, Zi --=_MailMate_B8B841A2-2B85-4DDE-84F3-4832B9BDBF41_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmD4jhQPHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKVM4QAIjMzfltkj+v72135tkjfcofPYCMG76Ay+7U Esnjn4pDHqTGZimrmlUGyNyJo0PpsMJ8jolMXKjNuw9WwXZS91N7LAAxuWb6PyFD 02k+8zn4wFtMVoR9MudTb4gla/+3KwWyUmr5OXHVbWURDvjHMtIypQneZ4h8+tUr Bkzw0dcgqTLPJKIIeLdKKXyo9mg6y9XRgfeYi4YRhQBBazNUJvD0V9jAVhHEXaMK q5X3Iqao9ag79ZdAJQQIEhgE2fKpyZDerpzMy676IDn+pxt9HLtcWnxH+iwTlXDB t+ySjAU0ONRXNaR/1wTsDyptYlVY7MJ9q8XVhHLvhJn6AMlA2HDEytvO0Dj3tUFx Gi7JHFtmzP8BAbp3GR9bx5AyOvBtvZwMkivJi3vSES+P+Nol5O6/3WGlhFIGdeyY FQSjqxWQx3imM2xsLwccqxSRlSmEeolXtC7PJgN9KdFqtKomrJfdSJiyV/ngeC+x Sti6xO7GsNuyik2mOt2RIvJqLHq8vSfKVt0qBGt7BtNYKsBfiIKHDR5ahYOOLJ6/ S+Cq1D2LJ/S8ulh2drb7d8im/sYL7yULWUR68cfaQAOA0fo0m7mjd+ceArLUFncj 2GoahbcExr5RTcY5rLG6mDBzDetms7USrdNVVtHAZ5W4B4OS67GWatSFvrVM7CSd +CX/WeB0 =8IB8 -----END PGP SIGNATURE----- --=_MailMate_B8B841A2-2B85-4DDE-84F3-4832B9BDBF41_=--