kernel/vm: Specifiy the page as the object being waited on in VMCache.

I got a strange whole-system hang in file_cache_resize into this
function. Possibly the page was spuriously busy, perhaps it wasn't,
but not having function arguments on x86_64 in stack traces, I was
unable to deduce what page was actually being waited on.

In case it happens again, this should allow it to be debugged further
by placing the address of the vm_page structure in the thread wait
informations. (A string is not very useful here anyway.)
This commit is contained in:
Augustin Cavalier 2022-06-13 22:43:15 -04:00
parent 44fa45df3a
commit 850fc02fa2

View File

@ -952,8 +952,7 @@ VMCache::WaitForPageEvents(vm_page* page, uint32 events, bool relock)
fPageEventWaiters = &waiter;
thread_prepare_to_block(waiter.thread, 0, THREAD_BLOCK_TYPE_OTHER,
"cache page events");
thread_prepare_to_block(waiter.thread, 0, THREAD_BLOCK_TYPE_OTHER, page);
Unlock();
thread_block();