On 11/25/21 02:28, Sean Christopherson wrote:
static _Bool ac_test_enough_room(ac_pool_t *pool)
{
- return pool->pt_pool_current + 5 * PAGE_SIZE <= pool->pt_pool_size;
+ /* '120' is completely arbitrary. */
+ return (pool->pt_pool_current + 5) < 120;
Since the initialization was:
pool->pt_pool_size = 120 * 1024 * 1024 - pool->pt_pool;
This should be 120 * 2^20 / 2^12 = 120 * 256 = 30720, which
is also arbitrary of course.
At this point I'm not sure there's a huge improvement, but I'll trust
you and go on reviewing...
Paolo
}
static void ac_test_reset_pt_pool(ac_pool_t *pool)