DRM Buddy & AMDGPU Wired Up For Clear Page Tracking In Linux 6.10
Sent in to DRM-Next as part of last week's drm-misc-next changes is implementing support for tracking cleared free memory and is initially wired up for the AMDGPU kernel graphics driver.
AMD engineers have been working on implementing "clear page" tracking functionality for the DRM buddy allocator. This feature is used for tracking cleared free memory and while not-yet-merged there's also been a patch for working on defragmentation support that relies on the clear page functionality.
The DRM buddy allocator can be used by different Direct Rendering Manager drivers but for DRM-Next the initial user of this clear page functionality is just the AMDGPU driver.
The prior patch series by AMD's Arunpravin Paneer Selvam further adds:
This clear page feature in the DRM buddy code and AMDGPU driver is part of this drm-misc-next pull going into the Linux 6.10 kernel once that merge window opens up later this month.
AMD engineers have been working on implementing "clear page" tracking functionality for the DRM buddy allocator. This feature is used for tracking cleared free memory and while not-yet-merged there's also been a patch for working on defragmentation support that relies on the clear page functionality.
The DRM buddy allocator can be used by different Direct Rendering Manager drivers but for DRM-Next the initial user of this clear page functionality is just the AMDGPU driver.
The prior patch series by AMD's Arunpravin Paneer Selvam further adds:
- Add tracking clear page feature.
- Driver should enable the DRM_BUDDY_CLEARED flag if it successfully clears the blocks in the free path. On the otherhand, DRM buddy marks each block as cleared.
- Track the available cleared pages size
- If driver requests cleared memory we prefer cleared memory but fallback to uncleared if we can't find the cleared blocks. when driver requests uncleared memory we try to use uncleared but fallback to cleared memory if necessary.
- When a block gets freed we clear it and mark the freed block as cleared, when there are buddies which are cleared as well we can merge them. Otherwise, we prefer to keep the blocks as separated.
This clear page feature in the DRM buddy code and AMDGPU driver is part of this drm-misc-next pull going into the Linux 6.10 kernel once that merge window opens up later this month.
5 Comments