mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-31 07:43:16 +00:00
buffer_cache: Improve buffer cache locking contention (#1973)
* Improve buffer cache locking contention * buffer_cache: Revert some changes * clang fmt 1 * clang fmt 2 * clang fmt 3 * buffer_cache: Fix build
This commit is contained in:
parent
6862c9aad7
commit
c25447097e
7 changed files with 104 additions and 240 deletions
|
@ -185,7 +185,7 @@ void PageManager::OnGpuUnmap(VAddr address, size_t size) {
|
|||
void PageManager::UpdatePagesCachedCount(VAddr addr, u64 size, s32 delta) {
|
||||
static constexpr u64 PageShift = 12;
|
||||
|
||||
std::scoped_lock lk{mutex};
|
||||
std::scoped_lock lk{lock};
|
||||
const u64 num_pages = ((addr + size - 1) >> PageShift) - (addr >> PageShift) + 1;
|
||||
const u64 page_start = addr >> PageShift;
|
||||
const u64 page_end = page_start + num_pages;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue