All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Valente <paolo.valente@linaro.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-block <linux-block@vger.kernel.org>, stable@vger.kernel.org
Subject: Re: [PATCH 1/3] bfq: Avoid false bfq queue merging
Date: Thu, 11 Jun 2020 16:12:15 +0200	[thread overview]
Message-ID: <AF7DA035-BC93-42D2-B0B6-8ECC3273DEBC@linaro.org> (raw)
In-Reply-To: <20200611083149.GB18088@quack2.suse.cz>



> Il giorno 11 giu 2020, alle ore 10:31, Jan Kara <jack@suse.cz> ha scritto:
> 
> On Thu 11-06-20 09:13:07, Paolo Valente wrote:
>> 
>> 
>>> Il giorno 5 giu 2020, alle ore 16:16, Jan Kara <jack@suse.cz> ha scritto:
>>> 
>>> bfq_setup_cooperator() uses bfqd->in_serv_last_pos so detect whether it
>>> makes sense to merge current bfq queue with the in-service queue.
>>> However if the in-service queue is freshly scheduled and didn't dispatch
>>> any requests yet, bfqd->in_serv_last_pos is stale and contains value
>>> from the previously scheduled bfq queue which can thus result in a bogus
>>> decision that the two queues should be merged.
>> 
>> Good catch! 
>> 
>>> This bug can be observed
>>> for example with the following fio jobfile:
>>> 
>>> [global]
>>> direct=0
>>> ioengine=sync
>>> invalidate=1
>>> size=1g
>>> rw=read
>>> 
>>> [reader]
>>> numjobs=4
>>> directory=/mnt
>>> 
>>> where the 4 processes will end up in the one shared bfq queue although
>>> they do IO to physically very distant files (for some reason I was able to
>>> observe this only with slice_idle=1ms setting).
>>> 
>>> Fix the problem by invalidating bfqd->in_serv_last_pos when switching
>>> in-service queue.
>>> 
>> 
>> Apart from the nonexistent problem that even 0 is a valid LBA :)
> 
> Yes, I was also thinking about that and decided 0 is "good enough" :). But
> I just as well just switch to (sector_t)-1 if you think it would be better.
> 

0 is ok :)

Thanks,
Paolo

>> Acked-by: Paolo Valente <paolo.valente@linaro.org>
> 
> Thanks!
> 
> 								Honza
> 
> -- 
> Jan Kara <jack@suse.com>
> SUSE Labs, CR


  reply	other threads:[~2020-06-11 14:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 14:16 [PATCH 0/3] bfq: Two fixes and a cleanup for sequential readers Jan Kara
2021-01-13 10:09 ` [PATCH 0/3 v2] " Jan Kara
2020-06-05 14:16 ` [PATCH 1/3] bfq: Avoid false bfq queue merging Jan Kara
2020-06-11  7:13   ` Paolo Valente
2020-06-11  8:31     ` Jan Kara
2020-06-11 14:12       ` Paolo Valente [this message]
2021-01-10  9:21         ` Paolo Valente
2020-06-05 14:16 ` [PATCH 2/3] bfq: Use 'ttime' local variable Jan Kara
2020-06-11  7:14   ` Paolo Valente
2020-06-05 14:16 ` [PATCH 3/3] bfq: Use only idle IO periods for think time calculations Jan Kara
2020-06-11 14:11   ` Paolo Valente
2020-06-11 14:39     ` Jan Kara
2020-07-22  9:13       ` Paolo Valente
2020-07-27  7:35         ` Jan Kara
2020-08-26 13:54           ` Jan Kara
2020-09-02 15:17             ` Jan Kara
2021-01-10  9:23               ` Paolo Valente
2021-01-13  9:56                 ` Jan Kara
2021-01-13 10:09 ` [PATCH 1/3] bfq: Avoid false bfq queue merging Jan Kara
2021-01-13 10:09 ` [PATCH 2/3] bfq: Use 'ttime' local variable Jan Kara
2021-01-13 10:09 ` [PATCH 3/3] bfq: Use only idle IO periods for think time calculations Jan Kara
2021-01-27 15:27 ` [PATCH 0/3 v2] bfq: Two fixes and a cleanup for sequential readers Jan Kara
2021-01-27 16:16   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AF7DA035-BC93-42D2-B0B6-8ECC3273DEBC@linaro.org \
    --to=paolo.valente@linaro.org \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.