lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6be15f08-dbb4-6b43-3d95-44044f1acdbc@kernel.dk>
Date:   Fri, 29 Mar 2019 10:15:33 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Holger Hoffstätte <holger@...lied-asynchrony.com>,
        Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
        linux-block@...r.kernel.org,
        Paolo Valente <paolo.valente@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block/bfq: fix ifdef for CONFIG_BFQ_GROUP_IOSCHED=y

On 3/29/19 10:12 AM, Holger Hoffstätte wrote:
> On 3/29/19 4:58 PM, Jens Axboe wrote:
>> On 3/29/19 9:56 AM, Holger Hoffstätte wrote:
>>> On 3/29/19 3:01 PM, Konstantin Khlebnikov wrote:
>>>> Replace BFQ_GROUP_IOSCHED_ENABLED with CONFIG_BFQ_GROUP_IOSCHED.
>>>> Code under these ifdefs never worked, something might be broken.
>>>>
>>>> Fixes: 0471559c2fbd ("block, bfq: add/remove entity weights correctly")
>>>> Fixes: 73d58118498b ("block, bfq: consider also ioprio classes in symmetry detection")
>>>> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
>>>> ---
>>>>    block/bfq-iosched.c |    2 +-
>>>>    block/bfq-wf2q.c    |    2 +-
>>>>    2 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
>>>> index 4c592496a16a..fac188dd78fa 100644
>>>> --- a/block/bfq-iosched.c
>>>> +++ b/block/bfq-iosched.c
>>>> @@ -674,7 +674,7 @@ static bool bfq_symmetric_scenario(struct bfq_data *bfqd)
>>>>    	 * at least two nodes.
>>>>    	 */
>>>>    	return !(varied_queue_weights || multiple_classes_busy
>>>> -#ifdef BFQ_GROUP_IOSCHED_ENABLED
>>>> +#ifdef CONFIG_BFQ_GROUP_IOSCHED
>>>>    	       || bfqd->num_groups_with_pending_reqs > 0
>>>>    #endif
>>>>    		);
>>>> diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
>>>> index 63311d1ff1ed..a11bef75483d 100644
>>>> --- a/block/bfq-wf2q.c
>>>> +++ b/block/bfq-wf2q.c
>>>> @@ -1012,7 +1012,7 @@ static void __bfq_activate_entity(struct bfq_entity *entity,
>>>>    		entity->on_st = true;
>>>>    	}
>>>>    
>>>> -#ifdef BFQ_GROUP_IOSCHED_ENABLED
>>>> +#ifdef CONFIG_BFQ_GROUP_IOSCHED
>>>>    	if (!bfq_entity_to_bfqq(entity)) { /* bfq_group */
>>>>    		struct bfq_group *bfqg =
>>>>    			container_of(entity, struct bfq_group, entity);
>>>>
>>>>
>>>
>>> Good catch! I run without group scheduling and therefore didn't notice these
>>> stray defines earlier. For 5.1 it should merge cleanly; adding this on top of
>>> the pending 5.2 BFQ patches required a small context fixup in hunk #1 due to
>>> "block, bfq: do not idle for lowest-weight queues".
>>
>> I'm hesitant to apply this, since the group scheduling stuff has obviously never
>> been tested.
> 
> This is simply a regression in 5.1 caused by 73d58118498b - nothing else,
> and as such this fix needs to go into 5.1 as well. I'm sure Paolo will agree.
> What you so ominously  call "the group scheduling stuff" has been there and
> shipping in mainline since day 1 of the BFQ merge, and it works fine in 5.0.

If that's the case (I didn't check how far back it went), then yes, it should
of course go into 5.1.

The ominous nature of my reply I'll chalk up to your interpretation

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ