Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp304581pxu; Thu, 3 Dec 2020 00:04:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+rmQoMl9n9Gta1J0OSxtCJobMfCvHnux7XdOL4VCoMGNPOPwUXF33lUFDImQkp4DUEs+t X-Received: by 2002:a17:906:25e:: with SMTP id 30mr1395631ejl.544.1606982656074; Thu, 03 Dec 2020 00:04:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606982656; cv=none; d=google.com; s=arc-20160816; b=Ol8+j96oY6+JxfsSYv/7/eWG57jG8r0g+VKB3ox7IRIXCK6XuDHm52LVPHAuVrCjSG qwQ6Ts/eDBiQtU+Mbhz7nGMJUDSipSRpmUi8mHeOTJ/1waneykERE5dKDzi0S/bE1zeA lByHExPo8SqEbK0JTgo2n5jGVDHWupZ64PdjuOMLH5h6Vd1T9TfdGFX8fFgeA0c79NSc WjdEkyyPOKU6sje3WzDGpCby7HRR1BmSM/VQT4PP/aofU7hBRIYor6XaSH/Vkxbngvlq nDZhGtDe6dx4p/S9qX3xvs7gAHhkszKgQSv8zASrtvEP3Xj1OXVkX3os//1mn1iyoTwa WjEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=c1Tc1OG4/I/r3ZS+i1ed5+AnAPKp5CQ+Qg1jawue+8c=; b=hg4YZwuTgBG2Z39CpPDMaF4WykucAYApe8x2HTEyb6Klx7YUNjyZNX+d8BdIHMCvnO hj6b/2UZaTDvcUMpAvvyQEjqTOVSGdWkiaGImAQyepN1gWPFshAs1Ro50dHaIaFdONsw 2QsV+CKc6IB/VDuWItwV6K5/zdzBD1HV3aLg5ubt6PTeVPQKmAAkyZMv3zLbCQ4aoZM6 htkiID4D7LSUhMd7BKvxDJvd6/TwtFcsgOhFUBVOfLCkaYmOflHX7pcJpSTJGK1kAWBO iXYbeoTrBae7Da13pwjtqHfVn8pZx8UoDeU6V6KFJeH8mPYnD8sUmB3tsRfxQfhnOiQq XmJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=EzVNbehb; 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=NONE 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 f12si548008edx.51.2020.12.03.00.03.53; Thu, 03 Dec 2020 00:04:16 -0800 (PST) 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=n1 header.b=EzVNbehb; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729897AbgLCICS (ORCPT + 99 others); Thu, 3 Dec 2020 03:02:18 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:18413 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728782AbgLCICS (ORCPT ); Thu, 3 Dec 2020 03:02:18 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 03 Dec 2020 00:01:37 -0800 Received: from [10.2.53.244] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 3 Dec 2020 08:01:28 +0000 Subject: Re: [PATCH 2/6] mm/gup: don't pin migrated cma pages in movable zone To: Pavel Tatashin , , , , , , , , , , , , , , , , , , , References: <20201202052330.474592-1-pasha.tatashin@soleen.com> <20201202052330.474592-3-pasha.tatashin@soleen.com> From: John Hubbard Message-ID: <2d383ee6-c5ab-48b6-3ccd-e32d211e01e3@nvidia.com> Date: Thu, 3 Dec 2020 00:01:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Thunderbird/83.0 MIME-Version: 1.0 In-Reply-To: <20201202052330.474592-3-pasha.tatashin@soleen.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1606982497; bh=c1Tc1OG4/I/r3ZS+i1ed5+AnAPKp5CQ+Qg1jawue+8c=; h=Subject:To:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=EzVNbehbvE3qNEc0OOEjfoujFjnOu8xH3LcP0/TZ5jun/kyBwOstVRqdjO5aVnKYm XbP0eLqahbs9nBp7PdsnNGtShwKYHIKtdCX2ggxPaoA0p9CJXD5JfSUa76Js0bYw0R tN02uxY+Gaqr0hdzXV/V2QPVmHmHqpxw9JVIYC7yg3rQZAyTyvsss/l8cMZfFgb1Vc H/Mc3v4PkvxxknFORKxcqE3TNF4UX3Lw9nTfaI0RLlIrcPfjYIkjyqBzJ+4clY7Ncv qX8D+FZC2XItbVFfNInfIxEF6Z0pFWNZAaAuo1gNy3T+j/I5TRy/gFlPhZJgtg4SAB 7bHefGL0F5vKg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/1/20 9:23 PM, Pavel Tatashin wrote: > In order not to fragment CMA the pinned pages are migrated. However, > they are migrated to ZONE_MOVABLE, which also should not have pinned pages. > > Remove __GFP_MOVABLE, so pages can be migrated to zones where pinning > is allowed. > > Signed-off-by: Pavel Tatashin > --- > mm/gup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/gup.c b/mm/gup.c > index cdb8b9eeb016..3a76c005a3e2 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -1610,7 +1610,7 @@ static long check_and_migrate_cma_pages(struct mm_struct *mm, > long ret = nr_pages; > struct migration_target_control mtc = { > .nid = NUMA_NO_NODE, > - .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_NOWARN, > + .gfp_mask = GFP_USER | __GFP_NOWARN, > }; > > check_again: > Reviewed-by: John Hubbard ...while I was here, I noticed this, which is outside the scope of your patchset, but I thought I'd just mention it anyway in case anyone cares: static inline bool is_migrate_movable(int mt) { return is_migrate_cma(mt) || mt == MIGRATE_MOVABLE; } ...that really should take an "enum migratetype mt" instead of an int, I think. thanks, -- John Hubbard NVIDIA