stvfe_dskoc_fco: Skip stvfe_wait for critical object reads (e.g. from LRU)

The exp thread is also critical. It must not starve, otherwise lru
starves also because of hitting OC_F_DYING objects.
parent 5ae27cf4
......@@ -414,7 +414,7 @@ stvfe_dskoc_fco(struct worker *wrk,
const struct stevedore *stv, const struct stvfe *stvfe,
struct objcore *oc, unsigned crit)
{
struct stvfe_wait_entry *we;
struct stvfe_wait_entry *we = NULL;
struct fellow_cache_res fcr;
struct objcore *refoc;
struct fcoc fcoc = {0};
......@@ -436,10 +436,12 @@ stvfe_dskoc_fco(struct worker *wrk,
return (fcoc);
}
we = stvfe_wait(stvfe->wait, oc->stobj->priv2);
if (we == NULL ) {
counter = &stvfe->stats->c_dsk_obj_get_coalesce;
goto again;
if (! crit) {
we = stvfe_wait(stvfe->wait, oc->stobj->priv2);
if (we == NULL ) {
counter = &stvfe->stats->c_dsk_obj_get_coalesce;
goto again;
}
}
/* we race to get the fco and, if we win the race,
......@@ -486,7 +488,8 @@ stvfe_dskoc_fco(struct worker *wrk,
stvfe->stats->c_dsk_obj_get++;
out:
stvfe_wait_signal(we, oc->stobj->priv2);
if (we)
stvfe_wait_signal(we, oc->stobj->priv2);
return (fcoc);
}
......@@ -608,7 +611,7 @@ sfedsk_objfree(struct worker *wrk, struct objcore *dskoc)
stvfe->stats->c_dsk_obj_free_thin++;
}
else if (
(fcoc = stvfe_dskoc_fco(wrk, stv, stvfe, dskoc, 0)).fco != NULL) {
(fcoc = stvfe_dskoc_fco(wrk, stv, stvfe, dskoc, 1)).fco != NULL) {
/* attempt to read to free space */
fellow_cache_obj_delete(stvfe->fc, fcoc.fco, oh->digest);
fcoc_fini(stvfe->fc, &fcoc);
......
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