kernel/vm: Rename vm_page::busy_writing to busy_io.

This way, it's clear that it can be used for more than just writing.

Change-Id: Ifd0928f0e8ec7b5eeb312795ceaae6e3fd266257
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10590
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2026-03-30 22:11:53 +00:00
committed by waddlesplash
parent dcf4948bff
commit 2b9d1bb9c2
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ private:
uint8 state : 3;
public:
bool busy : 1;
bool busy_writing : 1;
bool busy_io : 1;
bool accessed : 1;
bool modified : 1;
uint8 _unused : 1;
@@ -207,7 +207,7 @@ vm_page::Init(page_num_t pageNumber)
SetCacheRef(NULL);
InitState(PAGE_STATE_FREE);
busy = busy_writing = false;
busy = busy_io = false;
accessed = modified = false;
_unused = 0;
usage_count = 0;
+4 -4
View File
@@ -1119,16 +1119,16 @@ VMCache::_FreePageRange(VMCachePagesTree::Iterator it,
page = it.Next()) {
if (page->busy) {
if (!page->busy_writing) {
if (!page->busy_io) {
// wait for page to become unbusy
WaitForPageEvents(page, PAGE_EVENT_NOT_BUSY, true);
return true;
}
// We cannot wait for the page to become available
// as we might cause a deadlock this way
page->busy_writing = false;
// this will notify the writer to free the page
// as we might cause a deadlock that way
page->busy_io = false;
// this will notify the reader/writer to free the page
}
ASSERT(page->WiredCount() == 0);
+7 -7
View File
@@ -777,7 +777,7 @@ list_page(vm_page* page)
}
kprintf(" ");
if (page->busy) kprintf("B"); else kprintf("-");
if (page->busy_writing) kprintf("W"); else kprintf("-");
if (page->busy_io) kprintf("I"); else kprintf("-");
if (page->accessed) kprintf("A"); else kprintf("-");
if (page->modified) kprintf("M"); else kprintf("-");
kprintf("-");
@@ -986,7 +986,7 @@ dump_page_long(int argc, char **argv)
kprintf("wired_count: %d\n", page->WiredCount());
kprintf("usage_count: %d\n", page->usage_count);
kprintf("busy: %d\n", page->busy);
kprintf("busy_writing: %d\n", page->busy_writing);
kprintf("busy_io: %d\n", page->busy_io);
kprintf("accessed: %d\n", page->accessed);
kprintf("modified: %d\n", page->modified);
#if DEBUG_PAGE_QUEUE
@@ -2057,7 +2057,7 @@ PageWriteWrapper::SetTo(vm_page* page)
fIsActive = true;
fPage->busy = true;
fPage->busy_writing = true;
fPage->busy_io = true;
// We have a modified page -- however, while we're writing it back,
// the page might still be mapped. In order not to lose any changes to the
@@ -2091,14 +2091,14 @@ PageWriteWrapper::Done(status_t result)
bool success = true;
if (!fPage->busy_writing) {
// The busy_writing flag was cleared. That means the cache tried to remove
if (!fPage->busy_io) {
// The busy_io flag was cleared. That means the cache tried to remove
// the page while we were trying to write it. Let the cache handle the rest.
fCache->FreeRemovedPage(fPage);
} else if (result == B_OK) {
// put it into the active/inactive queue
move_page_to_appropriate_queue(fPage);
fPage->busy_writing = false;
fPage->busy_io = false;
DEBUG_PAGE_ACCESS_END(fPage);
fCache->NotifyPageEvents(fPage, PAGE_EVENT_NOT_BUSY);
@@ -2119,7 +2119,7 @@ PageWriteWrapper::Done(status_t result)
else
set_page_state(fPage, PAGE_STATE_INACTIVE);
fPage->busy_writing = false;
fPage->busy_io = false;
DEBUG_PAGE_ACCESS_END(fPage);
fCache->NotifyPageEvents(fPage, PAGE_EVENT_NOT_BUSY);