diff options
| author | Francois Dugast <francois.dugast@intel.com> | 2025-08-05 15:59:05 +0200 |
|---|---|---|
| committer | Francois Dugast <francois.dugast@intel.com> | 2025-08-06 13:34:58 +0200 |
| commit | ddeda6136038b4b313bb6f9b44f2d363e1233814 (patch) | |
| tree | b193c6306b0947a9e1f98352b0e10b58cbf199be /rust/helpers/xarray.c | |
| parent | d755ff6063852cbd43c666726b69333d33d0d379 (diff) | |
drm/pagemap: Allocate folios when possible
If the order is greater than zero, allocate a folio when populating the
RAM PFNs instead of allocating individual pages one after the other. For
example if 2MB folios are used instead of 4KB pages, this reduces the
number of calls to the allocation API by 512.
v2:
- Use page order instead of extra argument (Matthew Brost)
- Allocate with folio_alloc() (Matthew Brost)
- Loop for mpages and free_pages based on order (Matthew Brost)
v3:
- Fix loops in drm_pagemap_migrate_populate_ram_pfn() (Matthew Brost)
v4:
- Use folio_trylock(), set local variable to NULL (Matthew Brost)
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20250805140028.599361-5-francois.dugast@intel.com
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Diffstat (limited to 'rust/helpers/xarray.c')
0 files changed, 0 insertions, 0 deletions
