linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BUGFIX V2] block, bfq: fix operator in BFQQ_TOTALLY_SEEKY
@ 2019-06-22 20:44 Paolo Valente
  2019-06-24 16:12 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Valente @ 2019-06-22 20:44 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, linux-kernel, ulf.hansson, linus.walleij,
	bfq-iosched, oleksandr, Paolo Valente

By mistake, there is a '&' instead of a '==' in the definition of the
macro BFQQ_TOTALLY_SEEKY. This commit replaces the wrong operator with
the correct one.

Fixes: commit 7074f076ff15 ("block, bfq: do not tag totally seeky queues as soft rt")
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
---
 block/bfq-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index f8d430f88d25..f9269ae6da9c 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -240,7 +240,7 @@ static struct kmem_cache *bfq_pool;
  * containing only random (seeky) I/O are prevented from being tagged
  * as soft real-time.
  */
-#define BFQQ_TOTALLY_SEEKY(bfqq)	(bfqq->seek_history & -1)
+#define BFQQ_TOTALLY_SEEKY(bfqq)	(bfqq->seek_history == -1)
 
 /* Min number of samples required to perform peak-rate update */
 #define BFQ_RATE_MIN_SAMPLES	32
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH BUGFIX V2] block, bfq: fix operator in BFQQ_TOTALLY_SEEKY
  2019-06-22 20:44 [PATCH BUGFIX V2] block, bfq: fix operator in BFQQ_TOTALLY_SEEKY Paolo Valente
@ 2019-06-24 16:12 ` Jens Axboe
  2019-06-24 19:18   ` Paolo Valente
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2019-06-24 16:12 UTC (permalink / raw)
  To: Paolo Valente
  Cc: linux-block, linux-kernel, ulf.hansson, linus.walleij,
	bfq-iosched, oleksandr

On 6/22/19 2:44 PM, Paolo Valente wrote:
> By mistake, there is a '&' instead of a '==' in the definition of the
> macro BFQQ_TOTALLY_SEEKY. This commit replaces the wrong operator with
> the correct one.

A bit worrying that this wasn't caught in testing, as it would have
resulted in _any_ queue being positive for totally seeky?

Anyway, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BUGFIX V2] block, bfq: fix operator in BFQQ_TOTALLY_SEEKY
  2019-06-24 16:12 ` Jens Axboe
@ 2019-06-24 19:18   ` Paolo Valente
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Valente @ 2019-06-24 19:18 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, kernel list, Ulf Hansson, linus.walleij,
	bfq-iosched, oleksandr



> Il giorno 24 giu 2019, alle ore 18:12, Jens Axboe <axboe@kernel.dk> ha scritto:
> 
> On 6/22/19 2:44 PM, Paolo Valente wrote:
>> By mistake, there is a '&' instead of a '==' in the definition of the
>> macro BFQQ_TOTALLY_SEEKY. This commit replaces the wrong operator with
>> the correct one.
> 
> A bit worrying that this wasn't caught in testing, as it would have
> resulted in _any_ queue being positive for totally seeky?
> 

Fortunately there's a somewhat reassuring explanation.  The commit
introducing this macro prevented seeky queues from being considered
soft real-time.  And, to be more selective, it actually filtered out
only totally seeky queues, i.e., queues whose last I/O requests are
*all* random.  With this error, any seeky queue was considered totally
seeky.  This the broke (only) selectivity.

> Anyway, applied.
> 

Thanks,
Paolo

> -- 
> Jens Axboe
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-24 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22 20:44 [PATCH BUGFIX V2] block, bfq: fix operator in BFQQ_TOTALLY_SEEKY Paolo Valente
2019-06-24 16:12 ` Jens Axboe
2019-06-24 19:18   ` Paolo Valente

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).