logger: simplify pressure calculation

This commit is contained in:
Thomas Schoebel-Theuer 2021-02-05 13:58:35 +01:00 committed by Thomas Schoebel-Theuer
parent 8525456e78
commit 189ba67e7a
1 changed files with 3 additions and 2 deletions

View File

@ -2340,6 +2340,8 @@ bool _check_pressure(struct trans_logger_brick *brick)
{
int active;
if (!brick->power.button)
return false;
/*
* Writeback IO starvation can occur when too many concurrents reads
* are filling the IO channnels for a very long time (e.g. when
@ -2363,8 +2365,7 @@ bool _check_pressure(struct trans_logger_brick *brick)
atomic_read(&brick->any_fly_count) +
brick->q_phase[0].q_queued + brick->q_phase[0].q_active;
return (active > trans_logger_pressure_limit) &&
brick->power.button;
return (active > trans_logger_pressure_limit);
}
static noinline