Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-09-01 Thread Huang, Ying
Dev Jain writes: > On 8/19/24 12:28, Huang, Ying wrote: >> Dev Jain writes: >> >>> On 8/13/24 12:52, Dev Jain wrote: On 8/13/24 10:30, Dev Jain wrote: > On 8/12/24 17:38, Dev Jain wrote: >> On 8/12/24 13:01, Huang, Ying wrote: >>> Dev Jain writes: >>> On 8/12/24 11

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-20 Thread Dev Jain
On 8/19/24 12:28, Huang, Ying wrote: Dev Jain writes: On 8/13/24 12:52, Dev Jain wrote: On 8/13/24 10:30, Dev Jain wrote: On 8/12/24 17:38, Dev Jain wrote: On 8/12/24 13:01, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04,

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-19 Thread Huang, Ying
Dev Jain writes: > On 8/13/24 12:52, Dev Jain wrote: >> >> On 8/13/24 10:30, Dev Jain wrote: >>> >>> On 8/12/24 17:38, Dev Jain wrote: On 8/12/24 13:01, Huang, Ying wrote: > Dev Jain writes: > >> On 8/12/24 11:45, Huang, Ying wrote: >>> Dev Jain writes: >>> >>>

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-16 Thread Dev Jain
On 8/13/24 12:52, Dev Jain wrote: On 8/13/24 10:30, Dev Jain wrote: On 8/12/24 17:38, Dev Jain wrote: On 8/12/24 13:01, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As al

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-13 Thread Dev Jain
On 8/13/24 10:30, Dev Jain wrote: On 8/12/24 17:38, Dev Jain wrote: On 8/12/24 13:01, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-12 Thread Dev Jain
On 8/12/24 17:38, Dev Jain wrote: On 8/12/24 13:01, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-12 Thread Dev Jain
On 8/12/24 13:01, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check d

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-12 Thread David Hildenbrand
On 12.08.24 07:35, Dev Jain wrote: On 8/11/24 14:38, David Hildenbrand wrote: On 11.08.24 08:06, Dev Jain wrote: On 8/11/24 00:22, David Hildenbrand wrote: On 10.08.24 20:42, Dev Jain wrote: On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being don

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-12 Thread Huang, Ying
Dev Jain writes: > On 8/12/24 11:45, Huang, Ying wrote: >> Dev Jain writes: >> >>> On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: > As already being done in __migrate_folio(), wherein we backoff if the > folio refcount is wrong, make this check during

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Dev Jain
On 8/12/24 11:45, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Dev Jain
On 8/12/24 11:50, Huang, Ying wrote: Dev Jain writes: On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Huang, Ying
Dev Jain writes: > On 8/12/24 11:04, Huang, Ying wrote: >> Hi, Dev, >> >> Dev Jain writes: >> >>> As already being done in __migrate_folio(), wherein we backoff if the >>> folio refcount is wrong, make this check during the unmapping phase, upon >>> the failure of which, the original state of th

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Huang, Ying
Dev Jain writes: > On 8/12/24 11:04, Huang, Ying wrote: >> Hi, Dev, >> >> Dev Jain writes: >> >>> As already being done in __migrate_folio(), wherein we backoff if the >>> folio refcount is wrong, make this check during the unmapping phase, upon >>> the failure of which, the original state of th

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Dev Jain
On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Dev Jain
On 8/12/24 11:04, Huang, Ying wrote: Hi, Dev, Dev Jain writes: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Huang, Ying
Hi, Dev, Dev Jain writes: > As already being done in __migrate_folio(), wherein we backoff if the > folio refcount is wrong, make this check during the unmapping phase, upon > the failure of which, the original state of the PTEs will be restored and > the folio lock will be dropped via migrate_f

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread Dev Jain
On 8/11/24 14:38, David Hildenbrand wrote: On 11.08.24 08:06, Dev Jain wrote: On 8/11/24 00:22, David Hildenbrand wrote: On 10.08.24 20:42, Dev Jain wrote: On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we b

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-11 Thread David Hildenbrand
On 11.08.24 08:06, Dev Jain wrote: On 8/11/24 00:22, David Hildenbrand wrote: On 10.08.24 20:42, Dev Jain wrote: On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make t

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-10 Thread Dev Jain
On 8/11/24 00:22, David Hildenbrand wrote: On 10.08.24 20:42, Dev Jain wrote: On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phas

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-10 Thread Zi Yan
On 9 Aug 2024, at 9:47, David Hildenbrand wrote: > On 09.08.24 12:31, Dev Jain wrote: >> As already being done in __migrate_folio(), wherein we backoff if the >> folio refcount is wrong, make this check during the unmapping phase, upon >> the failure of which, the original state of the PTEs will b

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-10 Thread David Hildenbrand
On 10.08.24 20:42, Dev Jain wrote: On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original sta

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-10 Thread Dev Jain
On 8/9/24 19:17, David Hildenbrand wrote: On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored a

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread Christoph Lameter (Ampere)
On Fri, 9 Aug 2024, David Hildenbrand wrote: This really seems to be the latest point where we can "easily" back off and unlock the source folio -- in this function :) I wonder if we should be smarter in the migrate_pages_batch() loop when we start the actual migrations via migrate_folio_mo

Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread David Hildenbrand
On 09.08.24 12:31, Dev Jain wrote: As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio lock will be dropped via migrate_f

[PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

2024-08-09 Thread Dev Jain
As already being done in __migrate_folio(), wherein we backoff if the folio refcount is wrong, make this check during the unmapping phase, upon the failure of which, the original state of the PTEs will be restored and the folio lock will be dropped via migrate_folio_undo_src(), any racing thread wi