Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-10-07 Thread Matthew Brost
On Tue, Oct 08, 2024 at 12:33:51PM +1100, Alistair Popple wrote: > > Simona Vetter writes: > > > On Wed, Sep 25, 2024 at 01:44:37PM +0200, Simona Vetter wrote: > >> On Tue, Sep 24, 2024 at 04:42:19PM +, Matthew Brost wrote: > >> > On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-10-07 Thread Alistair Popple
Simona Vetter writes: > On Wed, Sep 25, 2024 at 01:44:37PM +0200, Simona Vetter wrote: >> On Tue, Sep 24, 2024 at 04:42:19PM +, Matthew Brost wrote: >> > On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote: >> > > On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: >> >

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-25 Thread Simona Vetter
On Wed, Sep 25, 2024 at 01:44:37PM +0200, Simona Vetter wrote: > On Tue, Sep 24, 2024 at 04:42:19PM +, Matthew Brost wrote: > > On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote: > > > On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: > > > > On Fri, Sep 20, 2024 at 05:

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-25 Thread Simona Vetter
On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: > > Matthew Brost writes: > > > Avoid multiple CPU page faults to the same device page racing by locking > > the page in do_swap_page before taking an additional reference to the > > page. This prevents scenarios where multiple CPU

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-25 Thread Simona Vetter
On Tue, Sep 24, 2024 at 04:42:19PM +, Matthew Brost wrote: > On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote: > > On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: > > > On Fri, Sep 20, 2024 at 05:50:10PM -0400, Felix Kuehling wrote: > > > > > > > > On 2024-09-20 17:

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-24 Thread Felix Kuehling
On 2024-09-24 12:42, Matthew Brost wrote: > On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote: >> On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: >>> On Fri, Sep 20, 2024 at 05:50:10PM -0400, Felix Kuehling wrote: On 2024-09-20 17:23, Matthew Brost wrote:

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-24 Thread Matthew Brost
On Tue, Sep 24, 2024 at 01:48:29PM +0200, Simona Vetter wrote: > On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: > > On Fri, Sep 20, 2024 at 05:50:10PM -0400, Felix Kuehling wrote: > > > > > > On 2024-09-20 17:23, Matthew Brost wrote: > > > > On Fri, Sep 20, 2024 at 04:26:50PM -0400

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-24 Thread Simona Vetter
On Fri, Sep 20, 2024 at 09:59:51PM +, Matthew Brost wrote: > On Fri, Sep 20, 2024 at 05:50:10PM -0400, Felix Kuehling wrote: > > > > On 2024-09-20 17:23, Matthew Brost wrote: > > > On Fri, Sep 20, 2024 at 04:26:50PM -0400, Felix Kuehling wrote: > > > > On 2024-09-18 11:10, Alistair Popple wrot

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-20 Thread Matthew Brost
On Fri, Sep 20, 2024 at 05:50:10PM -0400, Felix Kuehling wrote: > > On 2024-09-20 17:23, Matthew Brost wrote: > > On Fri, Sep 20, 2024 at 04:26:50PM -0400, Felix Kuehling wrote: > > > On 2024-09-18 11:10, Alistair Popple wrote: > > > > Matthew Brost writes: > > > > > > > > > On Wed, Sep 11, 2024

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-20 Thread Felix Kuehling
On 2024-09-20 17:23, Matthew Brost wrote: On Fri, Sep 20, 2024 at 04:26:50PM -0400, Felix Kuehling wrote: On 2024-09-18 11:10, Alistair Popple wrote: Matthew Brost writes: On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: Matthew Brost writes: I haven't seen the same in t

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-20 Thread Matthew Brost
On Fri, Sep 20, 2024 at 04:26:50PM -0400, Felix Kuehling wrote: > On 2024-09-18 11:10, Alistair Popple wrote: > > Matthew Brost writes: > > > > > On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: > > > > Matthew Brost writes: > > > > > > > > I haven't seen the same in the NVIDIA

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-20 Thread Felix Kuehling
On 2024-09-18 11:10, Alistair Popple wrote: Matthew Brost writes: On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: Matthew Brost writes: I haven't seen the same in the NVIDIA UVM driver (out-of-tree, I know) Still a driver. Indeed, and I'm happy to answer any questions abo

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-18 Thread Alistair Popple
Matthew Brost writes: > On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: >> >> Matthew Brost writes: >> >> I haven't seen the same in the NVIDIA UVM driver (out-of-tree, I know) > > Still a driver. Indeed, and I'm happy to answer any questions about our implementation. >> b

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-13 Thread Matthew Brost
On Wed, Sep 11, 2024 at 02:53:31PM +1000, Alistair Popple wrote: > > Matthew Brost writes: > > > Avoid multiple CPU page faults to the same device page racing by locking > > the page in do_swap_page before taking an additional reference to the > > page. This prevents scenarios where multiple CPU

Re: [PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-10 Thread Alistair Popple
Matthew Brost writes: > Avoid multiple CPU page faults to the same device page racing by locking > the page in do_swap_page before taking an additional reference to the > page. This prevents scenarios where multiple CPU page faults each take > an extra reference to a device page, which could ab

[PATCH 1/1] mm/migrate: Trylock device page in do_swap_page

2024-09-10 Thread Matthew Brost
Avoid multiple CPU page faults to the same device page racing by locking the page in do_swap_page before taking an additional reference to the page. This prevents scenarios where multiple CPU page faults each take an extra reference to a device page, which could abort migration in folio_migrate_map