Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2397182pxb; Thu, 3 Feb 2022 05:54:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwW1ypxG6dfV4kVgY7UElBZQvN7VxgSmjjDc8nOWn13vn0jPxCkFtilEfm/N3n6++RG11jd X-Received: by 2002:a17:907:7ea5:: with SMTP id qb37mr29225351ejc.573.1643896489720; Thu, 03 Feb 2022 05:54:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643896489; cv=pass; d=google.com; s=arc-20160816; b=xdhNJqNQsTS8a0NqNKRDWXCYjC0nfzTsA1xbA5WpMGQsEOncuiq1F+4JjwvM+JtxDG 4gcbylQ2HOSrCEoRfsvisjvTdRCu3C+7mja133rV2ZkmUNyN/o2dMDtXwQymafronw/S ME/9c7dHBmG8MqZ1zp0MWa5zQR0F+crsoI7A5UsA0/ktNPPyKBW5JtgaL3W5mEAYlc/0 joQRW7/qB6/clDli73liDc8srks8zWxvoWqGV4vaYrlej2zMnBb0TKmqHTyQ9m/AwjFB jF3tg7faDt5z66PHidbBkgQxMNuSmx59CeTJ4R1gihYsZt+zOD+806pNAluw8yzfJRaJ jTdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=B5dXUFu4F02c5p0qaOO1nvAxgrh0JAJOcuRgbAC8kDQ=; b=K4x1DFGEK+KkZk+gN+ZiX02x9Qz8FapXD66DhrmAVNB0Lo2yxwynAalhUG2n+w30fc tUR/RN8wChz1Fi+HiqVbJu0ifMyhsnSeY83NerM3W/cqu6sHuB26w5Tq0y1u2mhMIPfv Elojfef7ijNi6a/cWRcb37/YfWpDUr2JCcNcDtmunJwOMNbO/Afy/nSvdznEIEBJZuLm yZeM42GtP29z6qLE8+6smoPuhK0alwb7xPZLGdm/RAkX2hxs/2ezdAv6+JX748/WbP8S 9TqAemOiEU+JkNoPuBNRej1WlPUujuGNFLfgBVkeGObRke6tDPZ3RUJEdKTpqq6eHMPE P61g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=hRm4RiAz; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21si12752152eds.65.2022.02.03.05.54.23; Thu, 03 Feb 2022 05:54:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=hRm4RiAz; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236319AbiBAKLP (ORCPT + 99 others); Tue, 1 Feb 2022 05:11:15 -0500 Received: from mail-mw2nam10on2050.outbound.protection.outlook.com ([40.107.94.50]:43745 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236310AbiBAKLN (ORCPT ); Tue, 1 Feb 2022 05:11:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IiSik00hs8nFGFRSgg/jx+ZYBoGfmGUZiA1yLM0YciihyNZ3tXpjOT1isBCsNQIVncTDx60lz3Zpsp8EmZDII/HyrgCyYCCC0ZaqmyTxvJSmQufrPyh5dfkWXZzSKnPhTR4Qc0BIDUox9QnPKxYXFahUJWa5wPXQnm4UtDnGKQAowAPSwDnOf2HndsV/8bB3UZSQVdFdcJ7XxicHdB7GioZ5FWgDxEPdc3LmPVyUPVaTr7lZ8JpM+Y6BgE2TQ9fkVa+gG+4PAq0MNYzBiZzwQHxsxkHF/oM7q9u9p5lO8/7ZNP31BQeQyX+/pFiT5PfX2a2EaJGNZip5I6q3P+xtZQ== 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=B5dXUFu4F02c5p0qaOO1nvAxgrh0JAJOcuRgbAC8kDQ=; b=WDj4WhoikwIZlo83TYR4jw0KL/22X8ULEuixldkBD6rjCQ6UglHXFzfFKXs5bZYYr5g9OACkcRD05GATlQ3y8dQUXbMgtRVZLjg1C+AcfmuzCzx0O+evO3Zrz5GaeqHPT9Zrk0zc1dETXygRa13Yac4Rl+2AYBoEBxazRrxdSr53mtHZ0A5lbV5vwf7Du5ln/tXfZnHo9WfNUlXtdZhE1ybQkQWVCDJ535CXGJVuOz+BbnsqeN87mb1XtjRUB1aobGtkuzLeKppAJRN5fXwOK7qzAhGSzo0GEzvBHr3FvFz5cYrxI2RP1Zn5/uCTkXQhXt6FqjAml/YRRiCSWvs+4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=B5dXUFu4F02c5p0qaOO1nvAxgrh0JAJOcuRgbAC8kDQ=; b=hRm4RiAz1OnBsMfJJHiCIUc0A9osgrK7KJELroW5SgIxnKC/oXc6bsR36LN+1nOX+oM7wZs7h1V02WurTtNmZVGCICyp2L50uQp2zqayDH93dhK9KjsRyDonIm1PWsFWHlv5cFzXH3uPrmdJAfEvfUNyYrr7nEypnAcGYy8k3wdVq7GeJsEOBK0aFUnB28tn5X/Yb/yuYM/dxmp6pIq1woOmuYiG8GaXVBLOUC/dmDnx+xHshEgzOA3SkVe+cmn3j8jCn3HhhuujOhXiF3G6YiThwVZViWnFR0Gy9igqpJE2cl0Tv+I1lrORH1G4Gr2utp3nkrvOxU3/XO1M8r/BYw== Received: from MWHPR1701CA0018.namprd17.prod.outlook.com (2603:10b6:301:14::28) by DM6PR12MB4715.namprd12.prod.outlook.com (2603:10b6:5:36::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.18; Tue, 1 Feb 2022 10:11:12 +0000 Received: from CO1NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:301:14:cafe::32) by MWHPR1701CA0018.outlook.office365.com (2603:10b6:301:14::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.22 via Frontend Transport; Tue, 1 Feb 2022 10:11:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT047.mail.protection.outlook.com (10.13.174.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4930.15 via Frontend Transport; Tue, 1 Feb 2022 10:11:11 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 1 Feb 2022 10:11:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 1 Feb 2022 02:11:10 -0800 Received: from sandstorm.attlocal.net (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Tue, 1 Feb 2022 02:11:09 -0800 From: John Hubbard To: Andrew Morton , Peter Xu , Jason Gunthorpe CC: David Hildenbrand , Jan Kara , "Claudio Imbrenda" , "Kirill A . Shutemov" , Alex Williamson , Andrea Arcangeli , LKML , , John Hubbard Subject: [PATCH v2 0/4] mm/gup: some cleanups Date: Tue, 1 Feb 2022 02:11:04 -0800 Message-ID: <20220201101108.306062-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e51e191-100f-496f-d012-08d9e56b2c30 X-MS-TrafficTypeDiagnostic: DM6PR12MB4715:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8vMo9krAQcF3ys4juWkasn6rfsMraDi8vETlHFEKBi3aqNf1A4xMvZRIcdn/tW2Vy7/djniXNq+ajyWdZKbJzyLXEp7e2bb7oowmgTRLBIUxABfhCU/hn1Km6EqTdMeijhMgPS0buHlyanjBRGDo9SB9plFeQSGZDZqZjr8lTLMfq6M8Ga2hXylsJrHXiefOTbEZOx4Sm7ODVCiBwOIB5VFk0+7qZhjX1knvuLUZxQNHFPdKPJoJx3YcmTiYHWm8AjozSd2cQtfNCO9sSrCRUpglgcb4GuXHtSWloT+w4eNtB8aw+i9O4bZ6B4Rp/3bFwbZuaxZE1xynNbL4S8sfcXu3JXyJYrfm2J8O5s7nQ+vqngPCnSURILgQNeuIPQFIstKHbnZYvmlsTE1y35GRqXqSwFbK281LGbd+Tt6aQF94CBjjn7wbHOEOLe9BQP6E2Dfdr3s259OFTEHefHAiRMYdLcv967ZNw43Pb6DnFhLCtY/H9Siu9KoBsvxdOHfNFrUCLzFXOFYrdLxybz9o+tKHGFhYwMY0EPhn/rXAV1zweUc+GMS91AvaREimsB8rii+iO17EOnMURum6DEL8Zvbgu4K9mQOiI0Ob267n2sKhM1c3exxpcQQiKAfFGJabkp5z8M/+hYX5OLgDmYUXudSxNxX1mSo43IiAI9NUvEgHpRUQD0hQdfhv1ZksQICGrw5NosARM4OsNqc4s9vt2IGHgpUdVd2jOlkXyC/NhCBjZaGOLZUCPuKIOAgO7gARk09GPGucO8LneMGYfYjEnit7V/PgFi3ghgGYY7nXzwhEibYR0U0ls5GxB1yE4lnjlCFs4wzRwuukmfdw5+wdWw== X-Forefront-Antispam-Report: CIP:12.22.5.236;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(336012)(110136005)(36756003)(81166007)(2906002)(83380400001)(316002)(54906003)(426003)(26005)(1076003)(356005)(186003)(86362001)(2616005)(107886003)(82310400004)(8676002)(47076005)(70206006)(4326008)(36860700001)(40460700003)(7416002)(966005)(508600001)(6666004)(5660300002)(8936002)(70586007)(36900700001)(20210929001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 10:11:11.4043 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e51e191-100f-496f-d012-08d9e56b2c30 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.236];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4715 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Jason and all, Changes since v1: * Patch 4: changed from get_user_pages(), to get_user_pages_fast(). * Patch 4: Rewrote the commit description--thanks to Jan Kara for that feedback. * Patch 1: Removed Jerome's Cc from patch 1, due to a stale email address. * Added Reviewed-by's from David Hildenbrand and Jason Gunthorpe. Original cover letter, updated as necessary: I'm including Peter's patch as the first one in this tiny series. (The commit description has my r-b tag in place of my Cc, and removes Jerome's Cc because he is no longer at redhat.com) The second patch is what I had in mind for a follow-up to that, when we were discussing that fix [1]. Plus, a couple more small removals that I had queued up: The third patch removes a completely unused routine: pin_user_pages_locked(). The forth patch removes a similar routine, get_user_pages_locked(), that only has one caller. It now calls get_user_pages_fast(), instead. v1 of this patchset is here: https://lore.kernel.org/all/20220131051752.447699-1-jhubbard@nvidia.com/ [1] https://lore.kernel.org/all/20220125033700.69705-1-peterx@redhat.com/ thanks, John Hubbard John Hubbard (3): mm/gup: clean up follow_pfn_pte() slightly mm/gup: remove unused pin_user_pages_locked() mm/gup: remove get_user_pages_locked() Peter Xu (1): mm: Fix invalid page pointer returned with FOLL_PIN gups include/linux/mm.h | 4 -- mm/gup.c | 100 ++++----------------------------------------- mm/mempolicy.c | 21 ++++------ 3 files changed, 16 insertions(+), 109 deletions(-) base-commit: 26291c54e111ff6ba87a164d85d4a4e134b7315c -- 2.35.1