[AMD Official Use Only]
Hi Chris,
you misunderstood background about this case.
although
we expect this test case to fail, it should fail at the location where the Bo actual memory is actually allocated. now the code logic will cause the failure to allocate memory to store DMA address.
e.g: the case is failed in 2TB system
ram machine, it should be allocated successful, but it is failed.
allocate 1TB BO, the ttm should allocate 1TB/4k * 8 buffer to store allocate result (page address), this should not be
failed usually.
There is a similar fix in upstream kernel 5.18, before
this fix entered the TTM code, this problem existed in TTM.
mm: allow !GFP_KERNEL allocations for kvmalloc
Kevin
From: Koenig, Christian <Christian.Koenig@xxxxxxx>
Sent: Wednesday, April 20, 2022 6:53 PM To: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx <dri-devel@xxxxxxxxxxxxxxxxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx> Subject: Re: [PATCH] drm/ttm: fix ttm tt init fail when size exceeds kmalloc limit Am 20.04.22 um 11:07 schrieb Wang, Yang(Kevin):
LOL! Guys, this test case is intended to fail! The test consists of allocating a buffer so ridiculous large that it should never succeed and be rejected by the kernel driver. This patch here is a really clear NAK. Regards, Christian.
|