From 850fc02fa28a914f0b2fa25dbb83f9b8497904cc Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 13 Jun 2022 22:43:15 -0400 Subject: [PATCH] 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.) --- src/system/kernel/vm/VMCache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index 868d6f8f62..948c788ff8 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -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();