mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
This unit test verifies that the PD cache is capable of packing multiple PD allocations into a single page. The verification works by using the DMA fault injection method to prevent more than one DMA alloc from happening in the pd_cache code. If an OOM error is detected by the pd_cache code before the max number of PDs per page is allocated by the pd_cache then there's a failure in the packing code. The correct number of PDs per page is easy to calculate: it's just PAGE_SIZE / pd_size. JIRA NVGPU-1323 Change-Id: I2c5b58ecf32da48d503c576012d9e564a270144c Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1970876 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>