regionlist: For pre-allocation, do not wait for the buddy

parent 3c880f7c
......@@ -6655,7 +6655,7 @@ fellow_log_dle_submit(struct fellow_fd *ffd,
if (prealloc == NULL &&
ffd->logbuf->regions_to_free == NULL &&
prep->tofree.n) {
prealloc = regionlist_alloc(ffd->membuddy);
prealloc = regionlist_alloc_nowait(ffd->membuddy);
}
AZ(pthread_mutex_lock(&ffd->logmtx));
......
......@@ -216,6 +216,18 @@ regionlist_alloc(buddy_t *membuddy)
return (regionlist_init(alloc, membuddy));
}
static struct regionlist *
regionlist_alloc_nowait(buddy_t *membuddy)
{
struct buddy_ptr_page alloc;
alloc = buddy_alloc1_ptr_page(membuddy, regl_bits, regl_bits_cram);
if (alloc.ptr == NULL)
return (NULL);
return (regionlist_init(alloc, membuddy));
}
static unsigned
regionlist_used(const struct regionlist *rl)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment