Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-15 Thread David Hildenbrand
On 11.02.22 00:41, Alistair Popple wrote: > On Thursday, 10 February 2022 10:47:35 PM AEDT David Hildenbrand wrote: >> On 10.02.22 12:39, Alistair Popple wrote: >>> On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: On 07.02.22 05:26, Alistair Popple wrote: > Currently

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-13 Thread Alistair Popple
John Hubbard writes: > On 2/11/22 18:51, Alistair Popple wrote: […] >>> See below… >>> + } + + pages[i] = migrate_device_page(head, gup_flags); >> migrate_device_page() will return a new page that has been correctly pinned >> with gup_flags by

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-11 Thread John Hubbard
On 2/11/22 18:51, Alistair Popple wrote: ... @@ -1888,15 +1942,40 @@ static long check_and_migrate_movable_pages(unsigned long nr_pages, continue; prev_head = head; /* -* If we get a movable page, since we are going to be

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-11 Thread Alistair Popple
On Saturday, 12 February 2022 1:10:29 PM AEDT John Hubbard wrote: > On 2/6/22 20:26, Alistair Popple wrote: > > Currently any attempts to pin a device coherent page will fail. This is > > because device coherent pages need to be managed by a device driver, and > > pinning them would prevent a

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-11 Thread John Hubbard
On 2/6/22 20:26, Alistair Popple wrote: Currently any attempts to pin a device coherent page will fail. This is because device coherent pages need to be managed by a device driver, and pinning them would prevent a driver from migrating them off the device. However this is no reason to fail

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread Alistair Popple
On Thursday, 10 February 2022 10:47:35 PM AEDT David Hildenbrand wrote: > On 10.02.22 12:39, Alistair Popple wrote: > > On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: > >> On 07.02.22 05:26, Alistair Popple wrote: > >>> Currently any attempts to pin a device coherent page

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
On 10.02.22 12:39, Alistair Popple wrote: > On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: >> On 07.02.22 05:26, Alistair Popple wrote: >>> Currently any attempts to pin a device coherent page will fail. This is >>> because device coherent pages need to be managed by a

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread Alistair Popple
On Thursday, 10 February 2022 9:53:38 PM AEDT David Hildenbrand wrote: > On 07.02.22 05:26, Alistair Popple wrote: > > Currently any attempts to pin a device coherent page will fail. This is > > because device coherent pages need to be managed by a device driver, and > > pinning them would prevent

Re: [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-10 Thread David Hildenbrand
On 07.02.22 05:26, Alistair Popple wrote: > Currently any attempts to pin a device coherent page will fail. This is > because device coherent pages need to be managed by a device driver, and > pinning them would prevent a driver from migrating them off the device. > > However this is no reason to

[PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing

2022-02-06 Thread Alistair Popple
Currently any attempts to pin a device coherent page will fail. This is because device coherent pages need to be managed by a device driver, and pinning them would prevent a driver from migrating them off the device. However this is no reason to fail pinning of these pages. These are coherent and