shm: reduce contention on region events

This commit is contained in:
Alexey Rybalchenko
2022-01-04 20:13:57 +01:00
parent 692576a5b1
commit c04958e2a4
2 changed files with 75 additions and 74 deletions

View File

@@ -107,6 +107,17 @@ struct UnmanagedRegion
}
}
if (cfg.lock) {
LOG(debug) << "Locking region " << cfg.id.value() << "...";
Lock();
LOG(debug) << "Successfully locked region " << cfg.id.value() << ".";
}
if (cfg.zero) {
LOG(debug) << "Zeroing free memory of region " << cfg.id.value() << "...";
Zero();
LOG(debug) << "Successfully zeroed free memory of region " << cfg.id.value() << ".";
}
if (!remote) {
Register(shmId, cfg);
}