Avoid eager purging on the dedicated oversize arena when using bg thds.
We have observed new workload patterns (namely ML training type) that cycle through oversized allocations frequently, because 1) the dataset might be sparse which is faster to go through, and 2) GPU accelerated. As a result, the eager purging from the oversize arena becomes a bottleneck. To offer an easy solution, allow normal purging of the oversized extents when background threads are enabled.
This commit is contained in:
@@ -120,7 +120,10 @@ TEST_BEGIN(test_oversize_threshold) {
|
||||
*/
|
||||
ptr = mallocx(2 * 1024 * 1024, MALLOCX_ARENA(arena));
|
||||
dallocx(ptr, MALLOCX_TCACHE_NONE);
|
||||
expect_zu_ge(max_purged, 2 * 1024 * 1024, "Expected a 2MB purge");
|
||||
if (!is_background_thread_enabled()) {
|
||||
expect_zu_ge(max_purged, 2 * 1024 * 1024,
|
||||
"Expected a 2MB purge");
|
||||
}
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
Reference in New Issue
Block a user