Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3474515pxb; Mon, 4 Apr 2022 18:07:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbyTa3m2VqW9DOtuOnj7Nbz0qoTOB5Z6vZ4n06rSPBQTSC2Twbg6ale7YXlMMCxLhyMkOz X-Received: by 2002:a17:90a:8b8b:b0:1ca:6007:36e5 with SMTP id z11-20020a17090a8b8b00b001ca600736e5mr1113589pjn.128.1649120872532; Mon, 04 Apr 2022 18:07:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649120872; cv=pass; d=google.com; s=arc-20160816; b=UcbCzRJbJynPcm+4E1SOSdbVmoeueqh394WZIFaj8cQkrap0pQZoVYPEoJClgh32K3 tisi2iImrnbZSKWAmWIBTIctGYZ7zTHtC/FPfzU5X24aAyvjlr2DcxzdaUPdRn0bYISM H8uzaxIs8q+mJxynIV4I3d9mogoojBY9zQ1/TkH4hWl3tcn4PWySu4GOw9XuTc+NQB9H m0W7e3OFfXuuaImujecn1h/boybWSt5dSSOK9zVcAWYu5fgwZM/hAyR3G1GqQcfKQCBL 7ueoe9d5PEP7+Iu5tS9neoUhLtig48/J50oLi6ZvEZFfhLv+8O9Nu4W2iN7ozUH6UwJW UYAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wYOAz7xmnugnzgiRIZHEfmhmpWd1Bc0+wkCtsfoWffk=; b=0KS1/Uy5G+N8yYCQ7ixrsxNfMYLdbxZPFPTDJyiaE+AqFRVNcUXkElUzQoXqsR/3mP CVBT2g5D7PohNfB2onlaD41DPaUm9drUEB6KFgBb3QQ+7bjiyEKIU5aC8xeb6TlpvKwP 8m13hrBrGmgzsBIlv5ogvOKUpijdFWJWNLW9Z+SwW+4fUdKY+4lYveebrVQOBL0pl+xH 9TKqrMyzSv4hFZ/vqsFLwkdtApDTcGpVF7PPpIrxvj6JyNyhWIjEvZQ3shYYKD6NOriK +zGgmzMVpKqQc+m84iqwmqfTiyV29Kw4V688n4wF96qqfwcAsvuiKHQpU5WXfivxLygQ FD9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="DZ2/QsHq"; 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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y23-20020a62b517000000b004fa8a817638si9948636pfe.283.2022.04.04.18.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="DZ2/QsHq"; 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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2FA3D644C6; Mon, 4 Apr 2022 17:06:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380216AbiDDVa3 (ORCPT + 99 others); Mon, 4 Apr 2022 17:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379587AbiDDRlA (ORCPT ); Mon, 4 Apr 2022 13:41:00 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2043.outbound.protection.outlook.com [40.107.94.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D7C31DE3; Mon, 4 Apr 2022 10:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=COdoseiOPHuVKirxEue845b5mhPlXT7+39fMIeE9eIXUAvw1x1clHHaW89OO2IWm5Ire/ldURHoQRCp+EZueA53PMkn4UAKhnWE1lwvX+a0jvQ54qqweAfUCwZEppuSM26x+gKPNT8uqLkXqTVnTIORLVNRyZ0w9u7Bcp+KDs6BEI3U83wL74JklxX9v9UFfmK/YC0f5qlfAiTChjLnYOWPVv6gP2+qXJ8aBkriSlLQVxDwS/nsgnIKGECGEEFzf7v4Hmi/zo/fKNaKJHGSrRvWfzm+iCgudyNm5AHiNfiXNwCQcJp8TXYbb8tKtIOMWbONkYg5+KkWK5aTfjCRNTQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wYOAz7xmnugnzgiRIZHEfmhmpWd1Bc0+wkCtsfoWffk=; b=DvM2E4JBNFkfvKvJo9tLQLN5Ha5+fGp4k8/1tjkSvbUBEi50QHKYnP8uXZcS9aNk/YTD4SNSZdKhGwelOUhhIlut/bEdYfdOz6/a0fv5UXRRwplV1oRwzA3snDlqANaWh98zSfd9xfwIVi7p4eRT22G9qwuvIEcDcyHPWPFgTihtIfFZ/N2DzAf5qJZ2Z0gU+mlTJGBmoQggSU6Gg0IJXMpk7ZMsgMND5udPh9uCfsLIfNqIRmLDmETk5d827D6/53GmMmULUOsXZlEYapGulu+dxo05tmCTL/dSGCilCRYsvUcBpRRg3qOhaGzBlbR7xXrO294hkNfUvNEeOpkUiA== 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=wYOAz7xmnugnzgiRIZHEfmhmpWd1Bc0+wkCtsfoWffk=; b=DZ2/QsHq+Ta2enkwAFWqO9aaDTgY3TKpdCeAXZGFEG0FDEFSLzpJtR/qV5NioOuGDTjaFsiigt6hCJKQSp75zIFCRG5WWbqclmYNAGbVGwmZeRqrTNac9RitKByt3jfL0qZCqoROMKxy5pGjWj58ZMOIrpeaFpHoLwxxrI4ztl6bwWl9qumnPUkHV7lYijGCw5O/sNg0Y5WvCFxuQk8u9FGpNSMJn21HDMLqBAH8O4p6pRTPeRRdLJA3XkBKql7XCerRRkERC1RCWmOPEETBHEno2gTqfJSdlTMZr8A4+owggulQ2yRhIkNFbG6YdvDWpMIKiJ+2UcI8ZvBq8fcZeg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) by MWHPR12MB1422.namprd12.prod.outlook.com (2603:10b6:300:10::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Mon, 4 Apr 2022 17:39:00 +0000 Received: from MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::cdfb:f88e:410b:9374]) by MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::cdfb:f88e:410b:9374%5]) with mapi id 15.20.5123.031; Mon, 4 Apr 2022 17:39:00 +0000 Date: Mon, 4 Apr 2022 14:38:58 -0300 From: Jason Gunthorpe To: Felix Kuehling Cc: Christoph Hellwig , Alex Sierra , david@redhat.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, jglisse@redhat.com, apopple@nvidia.com, willy@infradead.org, akpm@linux-foundation.org Subject: Re: [PATCH v2 1/3] mm: add vm_normal_lru_pages for LRU handled pages only Message-ID: <20220404173858.GQ2120790@nvidia.com> References: <20220330212537.12186-1-alex.sierra@amd.com> <20220330212537.12186-2-alex.sierra@amd.com> <20220331085341.GA22102@lst.de> <82ed845d-2534-490c-f9b9-a875e0283cc9@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82ed845d-2534-490c-f9b9-a875e0283cc9@amd.com> X-ClientProxiedBy: MN2PR19CA0034.namprd19.prod.outlook.com (2603:10b6:208:178::47) To MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fdd41846-42d3-45ed-2777-08da166200a3 X-MS-TrafficTypeDiagnostic: MWHPR12MB1422:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6uJsoSle6nOY97uW25wGlfQ16+wj5DAz2n5Bd60rdgNPeI8L6JSY1ShWnWe6beSvkBBuyYJrBpG0R4PpDeECpzujFKtGCjbiPosnmjeYZLND+NiHfIpQo91vs97JGVOc5rkfL9wN11kfZvu9HCcPNOsI0aeQ4hZD9zOa8YD59AetxekhD/kGD0tliQZRwpnPI58mh8N6dXXqkDTT5LG35mg4JUh4zPnz2fZnrinJvcqrMa+MnrnwUbiKyHPNOD0neMDiwDgQxaHf8OlmuzSRBOaZX6Zo4+uBdmzgCRDSTDbMOoaHK3PJvilVzHLxwVkt+/qul9I1xDKy6EnIoJwMxmCJAnn6PKUiyFPWxXHS0Qt9jeQ0Tmv0f/zGLEnIW6Vnq1845IawYKvDWKAyOh5Csj4h3jL2zeu6VF5n/KNtC397Q4QG7ICJ5cnMUAixO6a+6eI+n6MzpQTi+aySPSq8RSOo04SCGkuqDXkJKsyxExPvtUvfmyCQUUFhqJyWyqkU+0zCglBAyY6spbIq29mu+4j12008pbJWUEkKwivUl0TuQW9gZSDC2HvAvNSnEkffjCvkDmVRQhlGojWeQj32Fdi7oto8xbxBcKdJoKMZRd5Onx1Ic3eh+muOHQ+hlWXmwJxiC1ROWgkTD82cIz8cHA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4192.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(7416002)(5660300002)(33656002)(54906003)(2616005)(6486002)(8936002)(86362001)(186003)(508600001)(26005)(4744005)(38100700002)(1076003)(6916009)(2906002)(66476007)(66556008)(66946007)(6506007)(6512007)(36756003)(8676002)(4326008)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hnr1vzfh1ED8SBc/kdvoO4l+IVlu3YpXhBlGAKbUNJS3MR1yV8f6TVFRiELr?= =?us-ascii?Q?mL4z7nrFz8BAkf9utQ+zD/wCX+qxM9HiuFdrmS+3EJZkADG9ulgUwVyu3/f5?= =?us-ascii?Q?A5dBX61LeR2m6Gi4RKMCDc574RShFlhmmotQzkjq8pdpb/OHQtJ2fo51hGC3?= =?us-ascii?Q?a1l8Qi1syZt4Ktd7MgNKJCHe4LVLkUk9OPn+ZcRwHIeNze/8xIVTnewZ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T/6oPr782wPoNAxASM5ebcWkDz?= =?us-ascii?Q?nxpfQ2RQAf1huM1PhudVcLT+Mgir+GQdBsLhsoa6PPWroF2mGcWAbXupM1AQ?= =?us-ascii?Q?n8U2MlZxcd7Te7jMVENK5SR2islAmskBcUi8k+1IbPmzGO5CUEMaLxQ1585f?= =?us-ascii?Q?H7mZqduw+9BGMisHuT6/YhMPNgJIjohwp75sEdNZ1y1oFM3mZwdidYPg/LvN?= =?us-ascii?Q?1GkhiS1dM6Us5bnPuedDcfYVsY5r9290SgMiOyZgygZ6trI383lPZj8H60LV?= =?us-ascii?Q?dgcx5+s+D7tpGjAWXGpv7ndt1BzLrZRp+ePm+CpyH7jOds+6uoJLxnzEc2WE?= =?us-ascii?Q?FUSGm496uTr0rmb0k0CiEN97PrWtMlOjl+PWAs72xMmWNrRwcK9MnabRufwJ?= =?us-ascii?Q?UU9+xrgZOkXvpWEHWF1nseteVzDTz37Ok8ebNqkCgCeLf7YUm6VRFnfMFiV3?= =?us-ascii?Q?DFUZcejOFxs6vjAvYK6qAdD2Vbki8f7+pAWhdGwjNcGOWXnSTDHTnjvWERUU?= =?us-ascii?Q?Lsuq+MgZDXNL2RjCpgW4TrPVYfYvb/mBqm4xBBrIOGWdDQ2UyR/O7Od+ZW0V?= =?us-ascii?Q?fTfc9bGtc2CApw9fsUcjWpZXWqnxuEHjXaNUonke8vlk6XzHYUUXyuJ/V7+w?= =?us-ascii?Q?9FIsxWvuLw=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdd41846-42d3-45ed-2777-08da166200a3 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4192.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2022 17:39:00.2127 (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: rhMsb9VNMgcgWYIyQHd8XLg3f4+HH0SAuZ8mU+S2FoRm/8jXCakFGLSO1hPnWYdH X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1422 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Apr 01, 2022 at 04:08:35PM -0400, Felix Kuehling wrote: > > In general I find the vm_normal_lru_page vs vm_normal_page > > API highly confusing. An explicit check for zone device pages > > in the dozen or so spots that care has a much better documentation > > value, especially if accompanied by comments where it isn't entirely > > obvious. > > OK. We can do that. It would solve the function naming problem, and we'd > have more visibility of device page handling in more places in the kernel, > which has educational value. Personally I find the 'is page XYZ' pretty confusing, like I don't know half of what the PageKsm annotations are for.. Testing against a specific property the code goes on to use right away seems more descriptive to me. Jason