[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yu0HsWC09OCgiDmd@nvidia.com>
Date: Fri, 5 Aug 2022 09:06:09 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Alistair Popple <apopple@...dia.com>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
"Sierra Guiza, Alejandro (Alex)" <alex.sierra@....com>,
Chaitanya Kulkarni <kch@...dia.com>,
Dan Williams <dan.j.williams@...el.com>,
Felix Kuehling <Felix.Kuehling@....com>,
John Hubbard <jhubbard@...dia.com>,
Logan Gunthorpe <logang@...tatee.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Muchun Song <songmuchun@...edance.com>,
Ralph Campbell <rcampbell@...dia.com>,
David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v2 1/2] mm/gup.c: Don't pass gup_flags to
check_and_migrate_movable_pages()
On Fri, Aug 05, 2022 at 04:29:52PM +1000, Alistair Popple wrote:
> @@ -2053,7 +2046,9 @@ static long __gup_longterm_locked(struct mm_struct *mm,
> NULL, gup_flags);
> if (rc <= 0)
> break;
> - rc = check_and_migrate_movable_pages(rc, pages, gup_flags);
> +
> + WARN_ON_ONCE(!(gup_flags & FOLL_PIN));
> + rc = check_and_migrate_movable_pages(rc, pages);
This should be moved up:
if (!(gup_flags & FOLL_LONGTERM))
return __get_user_pages_locked(mm, start, nr_pages, pages, vmas,
NULL, gup_flags);
if (WARN_ON(!(gup_flags & FOLL_PIN)))
return -EINVAL;
flags = memalloc_pin_save();
Jason
Powered by blists - more mailing lists