[PATCH v2 0/2] mm: gup: avoid CMA pinning and clean up stale logic

Hyesoo Yu posted 2 patches 6 months, 2 weeks ago
mm/gup.c | 58 +++++++++++++++++++++++++++++++-------------------------
1 file changed, 32 insertions(+), 26 deletions(-)
[PATCH v2 0/2] mm: gup: avoid CMA pinning and clean up stale logic
Posted by Hyesoo Yu 6 months, 2 weeks ago
This patch series addresses an issue where longterm GUP requests
could inadvertently pin unpinnable pages (such as CMA) when no
migratable folios are found. This regression was introduced by
commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked").

The first patch removes stale codes and unnecessary logic left.

The second patch fixes the logic to return -EAGAIN when unpinnable
pages are detected but no folios could be collected, allowing
migration to be retried rather than pinning the page.

Hyesoo Yu (2):
  mm: gup: clean up stale logic in migrate_longterm_unpinnable_folio()
  mm: gup: avoid CMA page pinning by retrying migration if no migratable
    page

 mm/gup.c | 58 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 32 insertions(+), 26 deletions(-)

-- 
2.49.0