fellow_log: We need to be even more conservative with membuddy space

parent 851d8639
......@@ -1172,14 +1172,14 @@ fellow_logcache_init(struct fellow_logcache *flc, struct fellow_fd *ffd,
AN(flc);
// sane upper limit to not eat up all of the membuddy
sz = buddy_size(ffd->membuddy) / 4;
sz = buddy_size(ffd->membuddy) / 8;
sz >>= MIN_FELLOW_BITS;
if (n > sz)
n = (typeof(n))sz;
if (n > BUDDY_REQS_MAX)
n = BUDDY_REQS_MAX;
if (n < 2)
n = 2; // fellow_logcache_(take|steal) assume 2 entries
n = 2; // fellow_logcache_(take|steal) assume 2 entries min
INIT_OBJ(flc, FELLOW_LOGCACHE_MAGIC);
flc->ffd = ffd;
......@@ -5844,7 +5844,7 @@ fellow_logwatcher_need_openlog(const struct fellow_logbuffer *lbuf,
* substantial amount of DLE changes
*/
sz = (buddy_size(lbuf->membuddy) / 4) /
sz = (buddy_size(lbuf->membuddy) / 8) /
sizeof(struct fellow_dlechg);
if (s->obj_chg > sz) {
......
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