diff --git a/slab_automove_extstore.c b/slab_automove_extstore.c index 2e8ed0726..d6a06596f 100644 --- a/slab_automove_extstore.c +++ b/slab_automove_extstore.c @@ -175,13 +175,15 @@ void slab_automove_extstore_run(void *arg, int *src, int *dst) { // if page delta, oom, or evicted delta, mark window dirty // classes marked dirty cannot donate memory back to global pool. - if (a->iam_after[n].evicted - a->iam_before[n].evicted > 0 || - a->iam_after[n].outofmemory - a->iam_before[n].outofmemory > 0) { - wd->evicted = 1; - wd->dirty = 1; - } - if (a->sam_after[n].total_pages - a->sam_before[n].total_pages > 0) { - wd->dirty = 1; + if (small_slab) { + if (a->iam_after[n].evicted - a->iam_before[n].evicted > 0 || + a->iam_after[n].outofmemory - a->iam_before[n].outofmemory > 0) { + wd->evicted = 1; + wd->dirty = 1; + } + if (a->sam_after[n].total_pages - a->sam_before[n].total_pages > 0) { + wd->dirty = 1; + } } // reclaim excessively free memory to global after a full window diff --git a/storage.c b/storage.c index 777e0b231..3f671024e 100644 --- a/storage.c +++ b/storage.c @@ -618,17 +618,6 @@ static void *storage_write_thread(void *arg) { int target_pages = 0; if (global_pages < settings.ext_global_pool_min) { target_pages = settings.ext_global_pool_min - global_pages; - // make sure there's room in each class but don't over-flush. - // ie: we're going to want to move pages from the class with the - // "oldest" items, but this thread has no way of getting that info - // up-to-date. So we just free some pages in all active classes - // and let the page mover free stuff up. - // However, if the target delta is large (100+ megs) we can end up - // flushing gigabytes of data across many classes. - // Thus, we clamp the target here. - if (target_pages > 5) { - target_pages = 5; - } } counter++; if (to_sleep > settings.ext_max_sleep)