mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:57:36 +00:00
Revert "Kernel: Share committed COW pages between whole VMObject lineage"
This reverts commit 2c0df5e7e7
.
This caused OOM on CI, so let's roll it back until we can figure it out.
This commit is contained in:
parent
5de7775d22
commit
25b76462bf
1 changed files with 11 additions and 10 deletions
|
@ -39,16 +39,17 @@ RefPtr<VMObject> AnonymousVMObject::try_clone()
|
||||||
if (!MM.commit_user_physical_pages(new_cow_pages_needed))
|
if (!MM.commit_user_physical_pages(new_cow_pages_needed))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (m_shared_committed_cow_pages) {
|
// Create or replace the committed cow pages. When cloning a previously
|
||||||
// We already have shared committed COW pages with another object.
|
// cloned vmobject, we want to essentially "fork", leaving us and the
|
||||||
// That sharing pool grows and the clone joins it.
|
// new clone with one set of shared committed cow pages, and the original
|
||||||
m_shared_committed_cow_pages->m_committed_pages += new_cow_pages_needed;
|
// one would keep the one it still has. This ensures that the original
|
||||||
} else {
|
// one and this one, as well as the clone have sufficient resources
|
||||||
m_shared_committed_cow_pages = try_create<CommittedCowPages>(new_cow_pages_needed);
|
// to cow all pages as needed
|
||||||
if (!m_shared_committed_cow_pages) {
|
m_shared_committed_cow_pages = try_create<CommittedCowPages>(new_cow_pages_needed);
|
||||||
MM.uncommit_user_physical_pages(new_cow_pages_needed);
|
|
||||||
return {};
|
if (!m_shared_committed_cow_pages) {
|
||||||
}
|
MM.uncommit_user_physical_pages(new_cow_pages_needed);
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Both original and clone become COW. So create a COW map for ourselves
|
// Both original and clone become COW. So create a COW map for ourselves
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue