Start getting the disk log block reserve earlier

Ref #28
parent c9461b06
......@@ -2286,11 +2286,12 @@ logbuffer_alloc_some(struct fellow_logbuffer *lbuf,
* also allocate that async to not delay the happy
* path (we are in the middle of flushing logs under the lock)
*
* XXX is 20% a good measure?
* XXX is 25% a good measure?
*/
if (lbuf->dskreqs == NULL &&
lbuf->dskreqs_mem.reqs.magic == 0 &&
lbuf->logreg->free_n * 5 < lbuf->logreg->space) {
(lbuf->logreg->free_n * 4 < lbuf->logreg->space ||
lbuf->logreg->free_n < LBUF_DSK_RSV_REQS * 4)) {
BUDDY_REQS_INIT(&lbuf->dskreqs_mem, lbuf->membuddy);
BUDDY_REQS_PRI(&lbuf->dskreqs_mem.reqs, FEP_MEM_LOG);
AN(buddy_req_extent(&lbuf->dskreqs_mem.reqs,
......
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