Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp541428pxj; Thu, 17 Jun 2021 08:20:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR5bpcbYpTY6ATVrUpDSB6NHSRHfFl/fv5rlnY/tZ43geWl0XjqhC+18uhX6tozkV0dpkI X-Received: by 2002:a92:c0c9:: with SMTP id t9mr4003465ilf.195.1623943212238; Thu, 17 Jun 2021 08:20:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623943212; cv=pass; d=google.com; s=arc-20160816; b=UjlWaDbc+Eh9biffqzN9IuEC8czTEO5osdTeW6nTrv590ikptcxq826WmbjcYwG0DT /nUYSuzZHAU7nav8w3nB/m5FoD6+3WTYRvZGpLY/YokcxDQ07L/wy4uesgKn05tcAA93 7hNOaRiqDmqgrvfk8TsV9t3CjPpNZUNCH7unBbIWTTPYIL+gu79DFnWrIluawQQWOGQD JHdc+BmILongeG9J6Sra8bYwJe4sm+zPNpaKPJbGguLLtreSKIp2jQUDmBq6hy/eA4rZ sF22dpWGPxvo5ySIbIxAWDc03rgoSQ/F86k7DfECVydzmd0Ut1TqOh6jHmi+wNhnutKa jurQ== 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=fto7oGTXuEchER0GieOzKEfkpiqMw64yv0w2SD6NgAs=; b=r0zpHupO87GunxdEn2YfAo8qTBAOTl0tca5W1Ho84R2732LOLhKsw3NLsdKxTmZQMo 0LD+fbJPW//ne5OyjmeEQBcdzPPrvud+X0tiI+o8p5y4kEG/pCf5NUn61ms2vDlZ5ChQ kULeBL13dF25dnY3oyWMuY0Mmw2ddNX1LX2+r4h3SH0OAemgT993GDKsl7ljnCYcbm+v Cd6MytVM7QPqMKEwQ6o/N9kLdh6LhH6WrcrTPU349CC66IevIHHPpGvtMqKcML8wtQfP DaBaroQzFzOE5QasGKAz9XFkno5d3ym/kh8OmdZw1+h5IRLfbf0MAQBbFYXoFM8jMRgO 4qMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=44IyS0h6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l16si6087920jam.101.2021.06.17.08.20.00; Thu, 17 Jun 2021 08:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@amd.com header.s=selector1 header.b=44IyS0h6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233226AbhFQPUr (ORCPT + 99 others); Thu, 17 Jun 2021 11:20:47 -0400 Received: from mail-dm6nam10on2064.outbound.protection.outlook.com ([40.107.93.64]:31616 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233247AbhFQPUq (ORCPT ); Thu, 17 Jun 2021 11:20:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Su5TomvLxZ1fLt3A8OEwwaWMJJSMx3V3isNQJOtCk7a0CYu9yzZFDTGjjnjgff8yhbOmMPhCr4hCc+1wbbJRr9B5loZxhXUTcU0IUiQiJDMMlu7Gn9ukDMOjMbFwOr4KTB9cIXqtwK5ZBmGViLApZEC8gD7vgYCogRwrRUcvbBgcx7VlL6xs+PfHTJyH6mBhcrjxsjcZVcZStHshLB0pxamIJOInP/sRt5jrXW5KF/Se4uXB+TOhZ2KW1EmFd3IzJPhVc/THfkaSWgferFyerQMtt3Vaj5HZfEyorWapruGmk2bUKjs6UAxoE6clRkyM5M2oDjooOLE/jLpKBLXe+w== 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=fto7oGTXuEchER0GieOzKEfkpiqMw64yv0w2SD6NgAs=; b=lGp6Xo2+rlxjzhL2DQOxUhcYiSnr7iFnekeiPDJ0jjz8a+fam4zSOhtEP0mLfmJmaLNPJMv7YTypQBigejbm3SjU/9ph7q1ODFETa98Ch+oGuE4ALPd+hP69TREtFCM8fzy7kdydtzELc3TYzGM15z00W6REzSDPXa8UKOnYePeml6U10UQxG6/ak+SHlmOkyCJL5peU3SZwNRAhHb9H0Z7g/fh0CyTdkhoT9/Lk6t1+VshW0OQ8JuM5mUSpyZwIDNN8zznkj4IFSJuuOrnvfUnQZyjaCW26BptmmwuT7xhXjOnr4DB1bWT1wjn3I/0D90YEQC3BalCbE3iTm2PmbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fto7oGTXuEchER0GieOzKEfkpiqMw64yv0w2SD6NgAs=; b=44IyS0h62j/MsTf/k2bizWLW6/XW6Z+BO5f/xxU5m4yH6BGWlHXgA3hVLMSH5Iwn/22BSHRp5K7z+upKLMFELpgZOd2VuQlwFNSuDiJY+qRn6JjDcrqSuMElzZcJvTBC7d7t0mo7du0MwfQOUmAvGEOGjbZo2yybQzG9Gj0GoU0= Authentication-Results: linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4419.namprd12.prod.outlook.com (2603:10b6:5:2aa::20) by DM6PR12MB4419.namprd12.prod.outlook.com (2603:10b6:5:2aa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Thu, 17 Jun 2021 15:18:38 +0000 Received: from DM6PR12MB4419.namprd12.prod.outlook.com ([fe80::b972:f4d6:9db3:5761]) by DM6PR12MB4419.namprd12.prod.outlook.com ([fe80::b972:f4d6:9db3:5761%2]) with mapi id 15.20.4242.021; Thu, 17 Jun 2021 15:18:38 +0000 From: Alex Sierra To: akpm@linux-foundation.org, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jgg@nvidia.com, jglisse@redhat.com, Alex Sierra Subject: [PATCH v3 8/8] mm: call pgmap->ops->page_free for DEVICE_GENERIC pages Date: Thu, 17 Jun 2021 10:17:05 -0500 Message-Id: <20210617151705.15367-9-alex.sierra@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210617151705.15367-1-alex.sierra@amd.com> References: <20210617151705.15367-1-alex.sierra@amd.com> Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0501CA0088.namprd05.prod.outlook.com (2603:10b6:803:22::26) To DM6PR12MB4419.namprd12.prod.outlook.com (2603:10b6:5:2aa::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from alex-MS-7B09.amd.com (165.204.78.1) by SN4PR0501CA0088.namprd05.prod.outlook.com (2603:10b6:803:22::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.9 via Frontend Transport; Thu, 17 Jun 2021 15:18:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c3e5518-b32c-4da1-8587-08d931a32e68 X-MS-TrafficTypeDiagnostic: DM6PR12MB4419: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:418; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: prbdEARtjiVwmpoU2ubspx8qA1E4h+bBUheQ66S0xDTjsQeXg5IGKoC3W97gZyYtlQ+LDvuVRaavXsVHxx5gEUKtl6d5IDlWHXsuqrcUXPNVZQPmzpinQdLdqTUY3u3WTK//aVrJ1pFyrFvLu3QNt6kmJ1tJNvDl0iImuN+E603YAgfgYEhS12Hm5eDNlCmSWBrl1gayDlUbYmXanLYdiobg/QwWSPKgyrlKXr/d7zxJ18RDhJz2kejcRr3K4IGhVnvifS4NpyecyNFbXGFskruWnproGBCeh9qGvdXVWn6AOkNR+ZnvGW3SN3oQ9WmyelRyy8CDJ0rR5IHabCr3/QdE7Lpk0KvogMjxyfPdHm+Pr3EP2G081ST9SIRjqH9mCX9ANH6JJVu+5MYbJpqW9fLU6bcI93PYYnkUJKNgrozDRalfB7VsebD+4cgstrNRxa3g195+enCN8yuGWPdO6O/UZwHOSfnwGmvNU8ex8tWpUo8XY2zLe4vofJwAlBDW8RqinlHzP5oCl2851itSRUZslFbWvZzEP2d5dun3FeQPUKP+tvMpvtJS5ArV+Y2mCfWCJ8E1PqDyl+7LVztoHksgqonTlRE2rg18Wvm5O/f5WjEdgVvvDHKPgsCrH0nv1JlggOamd9MCOZ1R6BlmsJ2a6dzLmCZHXYcpt20QhgFPl5yeogjUpL7YhZBT97F5 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4419.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(136003)(376002)(346002)(396003)(8936002)(6486002)(36756003)(4744005)(478600001)(66476007)(1076003)(7416002)(4326008)(2616005)(956004)(2906002)(6666004)(44832011)(38350700002)(83380400001)(316002)(38100700002)(26005)(8676002)(5660300002)(16526019)(186003)(86362001)(66946007)(66556008)(52116002)(7696005)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AEnLH+l5spL7tf/v6XRUU1tH8GsTIZl5pgLfUQvW/NYQ0vVBAr4BvBUUtiPT?= =?us-ascii?Q?pTxR9HU/savzt+OKVsbMpfGEExyGeq9RI+Tvg6vqypAfcwYku3/mWuNbpX5n?= =?us-ascii?Q?TcBSoNepMzJc3p//fNXWF4jAdtnVrlkJcGGOwwrMtWIp6ey+l+7IaGJJR9mu?= =?us-ascii?Q?OOeElLQtoLVP3AStoFs3nzKvM0EG4TLgMQBp2Uagwef0pO4BgS0owulkRnlj?= =?us-ascii?Q?lrlwPFpHmILxXC9uzAiHuYFk57q/7eZoQsZrtObflamWrTDQIbYJfbb5HxEJ?= =?us-ascii?Q?IrtgQxXUSvOZm5IljhI7HQ2rjkmAeIGlAHQBy/akQCdi8gsNof0fMoELR34m?= =?us-ascii?Q?WNz1gy1wR3LG4ZNRemwqVC+I79GRYHgtrdoVRvOEhzs3TVYTohrwwRxmunAP?= =?us-ascii?Q?hgLt73g5NJB1me2ZM8adc/LfbIvYf/DuWSEQmOmUqbFopi0W1/irOiyLYf/3?= =?us-ascii?Q?rqXHn1DGWwc7j6fN894H76nmWCvYB0l5Xuu8YR40Srhlr/PbAryBB6RCS3Fn?= =?us-ascii?Q?+HZO0+ZlRZZ82DKLUNnji89zApK+3QSLgmvf5dhn6V8JrqKhXt1zjFtk+P5M?= =?us-ascii?Q?k5B159MevTVhLGKuh5ql5ZYC64jUQuiqpqRwnqak9WSsBK4IIZXgeGxpKPMS?= =?us-ascii?Q?JhTLjudwYP3eU72DaeRrHkdG1cIMtta0op9Welay1orzLU7BRGVDAukvLoUv?= =?us-ascii?Q?+b48T1NnsVQ3YOMWx21siKoaoV4UhJvbyWYL5HdH0rLR7QgGYPcuezJC+8Zb?= =?us-ascii?Q?UqURMq2J9x2zDqd7z8gecwCaJcDZCRbEETAIQVKLfPr/xVT4YycoP8atLGTk?= =?us-ascii?Q?HlvZMRBLMG1Rp3P4wZJnvjJXiRQXQIUZjT/Xr3g1T9EiDK8HF5NCJ4nmP5bT?= =?us-ascii?Q?nGyDdtm4hLGnRfcw9NRWdfhiWEk4mQ3oN4Uu4ZJHNXufpagMKGDHu9Pt3L94?= =?us-ascii?Q?UiE0y1wkHNhNZAKJHwt975UfV0uusoMMFlLBMn8Ym+fAK9ckvd2dPJMh0BuV?= =?us-ascii?Q?nLeSecG9NZCBELr6OrQ720a5QGSmlExLORXc700h0IIdaJj7DdYHzqfb0ZTx?= =?us-ascii?Q?wsLUs4lZRkqroi9YJ2TuZkeiZZq2MJtL1rNdC43p6s3LA5OL+eM3ZGrAq1hx?= =?us-ascii?Q?UewsO1msibmFBQOYUdaS9xVfl0qRz3cVqQpqsrCDNwYxbKNd8YjPbcr8zme4?= =?us-ascii?Q?c9DaolVUyHMGDD1DAM+rcwRwEteM+KcV2TFaVBkS1tO/K6T45KbMf/FLsuUu?= =?us-ascii?Q?2pRITin6TMZrGo46MvDTOIBvtF+XfiA9W22OfnTCXRMoMDhfYHTwx+n150Nf?= =?us-ascii?Q?BZF0ZGqWDnUlUZI5Owl+dJVK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c3e5518-b32c-4da1-8587-08d931a32e68 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4419.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 15:18:38.1361 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9XEHR6JOUXkYDVCoTv94a7lxLWnsQfXyFrojKHWuYblJ+gCMpVURrYWdox/aiC+OgeGyhWWDGqqLATCMR1hhSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4419 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Add MEMORY_DEVICE_GENERIC case to free_zone_device_page callback. Device generic type memory case is now able to free its pages properly. Signed-off-by: Alex Sierra --- mm/memremap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index 614b3d600e95..6c884e2542a9 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -438,7 +438,7 @@ struct dev_pagemap *get_dev_pagemap(unsigned long pfn, EXPORT_SYMBOL_GPL(get_dev_pagemap); #ifdef CONFIG_DEV_PAGEMAP_OPS -static void free_device_private_page(struct page *page) +static void free_device_page(struct page *page) { __ClearPageWaiters(page); @@ -477,7 +477,8 @@ void free_zone_device_page(struct page *page) wake_up_var(&page->_refcount); return; case MEMORY_DEVICE_PRIVATE: - free_device_private_page(page); + case MEMORY_DEVICE_GENERIC: + free_device_page(page); return; default: return; -- 2.17.1