From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BA89C64E7B for ; Thu, 3 Dec 2020 08:01:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C2DDC20C56 for ; Thu, 3 Dec 2020 08:01:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2DDC20C56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 290C06B0068; Thu, 3 Dec 2020 03:01:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 240246B006C; Thu, 3 Dec 2020 03:01:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1303D6B006E; Thu, 3 Dec 2020 03:01:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id EDB8A6B0068 for ; Thu, 3 Dec 2020 03:01:39 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id ADB833629 for ; Thu, 3 Dec 2020 08:01:39 +0000 (UTC) X-FDA: 77551226718.10.ants20_1905e1b273ba Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 8389216A0DD for ; Thu, 3 Dec 2020 08:01:39 +0000 (UTC) X-HE-Tag: ants20_1905e1b273ba X-Filterd-Recvd-Size: 3844 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Dec 2020 08:01:38 +0000 (UTC) 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== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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