Message ID | 20230219104309.1511562-18-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp662634wrn; Sat, 18 Feb 2023 19:04:54 -0800 (PST) X-Google-Smtp-Source: AK7set/DsGvqDl2EhS20EMyMbjABY02YxV5YLhRqw90I+oA4ojW+72jfER8UwWeEJVAXMzVFuy7J X-Received: by 2002:a05:6a20:728c:b0:bc:3290:5759 with SMTP id o12-20020a056a20728c00b000bc32905759mr6591093pzk.34.1676775893703; Sat, 18 Feb 2023 19:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676775893; cv=none; d=google.com; s=arc-20160816; b=sPZuur4YjkmIHO/rteOe9zLtgth30cv1Nvp7heV4yLsSz+vqkWuPgL8jHbmK4LqWN8 AqdbLE6fbT9fSkksBinXkSjXvQ6pGYhTuDfbZU4QeyyYlO0Q/lnwbeWaK9rtXtiTgrSf BporK0sC9BDHfia+i8p/LE9lKuHrIiahpN0ySnWDQqSsoyigvhCn2gLeAoYiRxgwjq8D 1BKzZvS+LZYmTxgcqQLmNjneFxqRqjO+iX4aiOr4rzpdxR1Qnp/z3JSVhewkHit5WZ63 //AxxnrfToW8Xg420cEl2hDa3cTPGxAVqihNtAiJdiLvt8h13a8c6xj3Neix3i8IngnT 16SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=118sen3eHVkNEhkuZvZO0dMHB4tJfIA6Jx2rNW/icds=; b=qKh0G7ApdNf+f7/VJUo5hfj2WXL3WleLeg8TGzKtwN8aWtM8iaUuMZ1uHNIoTpx3fP ynJr4ln4lT4EAysLvtvFGh0ZmxdBRSDbJ7OO/5PcStDK778qTdE9XgJjeartJyE0ESxI QXKj0WHP+cZ32PilvgAG7oKy1lFFTKLjQQq5574r2KNNYNidTDXqNnjOmc/AoShJphzi LOV0vwwHM1mM/vEiAYbMzA8uvh80FW/V4/16xFS8nr+z6peBYE+w4KPWUrrtEWpYI5ox vj9xa+Lp5iBgMzDBN+ltPizHeTLJVtrCZfskMt9cQp6Cdr6b/mIPaP5zBARW4mMNFWNh teFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m32-20020a635820000000b004fb27746031si9287817pgb.829.2023.02.18.19.04.39; Sat, 18 Feb 2023 19:04:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjBSCmF (ORCPT <rfc822;nanshango2@gmail.com> + 99 others); Sat, 18 Feb 2023 21:42:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjBSCla (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 18 Feb 2023 21:41:30 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A2611EB2; Sat, 18 Feb 2023 18:41:30 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PK8v92Pnxz4f3jHn; Sun, 19 Feb 2023 10:41:25 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgBH7utQjPFjPmleDw--.7604S19; Sun, 19 Feb 2023 10:41:27 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: paolo.valente@linaro.org, axboe@kernel.dk, jack@suse.cz Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH 17/17] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge Date: Sun, 19 Feb 2023 18:43:09 +0800 Message-Id: <20230219104309.1511562-18-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230219104309.1511562-1-shikemeng@huaweicloud.com> References: <20230219104309.1511562-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgBH7utQjPFjPmleDw--.7604S19 X-Coremail-Antispam: 1UD129KBjvdXoW7GFykWr4fKFyruF1xXF47Arb_yoWkGrb_tF ykKa4xtr4UGry5Xw1Yyr4xJ3ZxJFW8XF18ZF4qg34DJF17XFn5CasFgrs0yFZ8Ga1IkFy3 G397Wwn8GF1kWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbqxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVW8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JV WxJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7sRiVb yDUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758226959635774131?= X-GMAIL-MSGID: =?utf-8?q?1758226959635774131?= |
Series |
Some bugfix and cleanup patches for bfq
|
|
Commit Message
Kemeng Shi
Feb. 19, 2023, 10:43 a.m. UTC
We could traversal bfqq->new_bfqq list without a local variable easily and
intuitively. So remove unnecessary local variable __bfqq.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
block/bfq-iosched.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
Hi Kemeng, https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kemeng-Shi/block-bfq-properly-mark-bfqq-remained-idle/20230219-104312 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20230219104309.1511562-18-shikemeng%40huaweicloud.com patch subject: [PATCH 17/17] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge config: openrisc-randconfig-m041-20230219 (https://download.01.org/0day-ci/archive/20230220/202302200841.9zinyY7i-lkp@intel.com/config) compiler: or1k-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <error27@gmail.com> | Link: https://lore.kernel.org/r/202302200841.9zinyY7i-lkp@intel.com/ New smatch warnings: block/bfq-iosched.c:2785 bfq_setup_merge() error: we previously assumed 'new_bfqq' could be null (see line 2766) Old smatch warnings: block/bfq-iosched.c:6195 __bfq_insert_request() warn: variable dereferenced before check 'bfqq' (see line 6191) vim +/new_bfqq +2785 block/bfq-iosched.c 36eca894832351 Arianna Avanzini 2017-04-12 2751 static struct bfq_queue * 36eca894832351 Arianna Avanzini 2017-04-12 2752 bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) 36eca894832351 Arianna Avanzini 2017-04-12 2753 { 36eca894832351 Arianna Avanzini 2017-04-12 2754 int process_refs, new_process_refs; 36eca894832351 Arianna Avanzini 2017-04-12 2755 36eca894832351 Arianna Avanzini 2017-04-12 2756 /* 36eca894832351 Arianna Avanzini 2017-04-12 2757 * If there are no process references on the new_bfqq, then it is 36eca894832351 Arianna Avanzini 2017-04-12 2758 * unsafe to follow the ->new_bfqq chain as other bfqq's in the chain 36eca894832351 Arianna Avanzini 2017-04-12 2759 * may have dropped their last reference (not just their last process 36eca894832351 Arianna Avanzini 2017-04-12 2760 * reference). 36eca894832351 Arianna Avanzini 2017-04-12 2761 */ 36eca894832351 Arianna Avanzini 2017-04-12 2762 if (!bfqq_process_refs(new_bfqq)) 36eca894832351 Arianna Avanzini 2017-04-12 2763 return NULL; 36eca894832351 Arianna Avanzini 2017-04-12 2764 36eca894832351 Arianna Avanzini 2017-04-12 2765 /* Avoid a circular list and skip interim queue merges. */ 114533e1e26a36 Kemeng Shi 2023-02-19 @2766 while ((new_bfqq = new_bfqq->new_bfqq)) { 114533e1e26a36 Kemeng Shi 2023-02-19 2767 if (new_bfqq == bfqq) 36eca894832351 Arianna Avanzini 2017-04-12 2768 return NULL; 36eca894832351 Arianna Avanzini 2017-04-12 2769 } This now loops until new_bfqq is NULL. 36eca894832351 Arianna Avanzini 2017-04-12 2770 36eca894832351 Arianna Avanzini 2017-04-12 2771 process_refs = bfqq_process_refs(bfqq); 36eca894832351 Arianna Avanzini 2017-04-12 2772 new_process_refs = bfqq_process_refs(new_bfqq); What? 36eca894832351 Arianna Avanzini 2017-04-12 2773 /* 36eca894832351 Arianna Avanzini 2017-04-12 2774 * If the process for the bfqq has gone away, there is no 36eca894832351 Arianna Avanzini 2017-04-12 2775 * sense in merging the queues. 36eca894832351 Arianna Avanzini 2017-04-12 2776 */ 36eca894832351 Arianna Avanzini 2017-04-12 2777 if (process_refs == 0 || new_process_refs == 0) 36eca894832351 Arianna Avanzini 2017-04-12 2778 return NULL; 36eca894832351 Arianna Avanzini 2017-04-12 2779 c1cee4ab36acef Jan Kara 2022-04-01 2780 /* c1cee4ab36acef Jan Kara 2022-04-01 2781 * Make sure merged queues belong to the same parent. Parents could c1cee4ab36acef Jan Kara 2022-04-01 2782 * have changed since the time we decided the two queues are suitable c1cee4ab36acef Jan Kara 2022-04-01 2783 * for merging. c1cee4ab36acef Jan Kara 2022-04-01 2784 */ c1cee4ab36acef Jan Kara 2022-04-01 @2785 if (new_bfqq->entity.parent != bfqq->entity.parent) c1cee4ab36acef Jan Kara 2022-04-01 2786 return NULL; c1cee4ab36acef Jan Kara 2022-04-01 2787 36eca894832351 Arianna Avanzini 2017-04-12 2788 bfq_log_bfqq(bfqq->bfqd, bfqq, "scheduling merge with queue %d", 36eca894832351 Arianna Avanzini 2017-04-12 2789 new_bfqq->pid); 36eca894832351 Arianna Avanzini 2017-04-12 2790 36eca894832351 Arianna Avanzini 2017-04-12 2791 /* 36eca894832351 Arianna Avanzini 2017-04-12 2792 * Merging is just a redirection: the requests of the process 36eca894832351 Arianna Avanzini 2017-04-12 2793 * owning one of the two queues are redirected to the other queue. 36eca894832351 Arianna Avanzini 2017-04-12 2794 * The latter queue, in its turn, is set as shared if this is the 36eca894832351 Arianna Avanzini 2017-04-12 2795 * first time that the requests of some process are redirected to 36eca894832351 Arianna Avanzini 2017-04-12 2796 * it. 36eca894832351 Arianna Avanzini 2017-04-12 2797 * 6fa3e8d34204d5 Paolo Valente 2017-04-12 2798 * We redirect bfqq to new_bfqq and not the opposite, because 6fa3e8d34204d5 Paolo Valente 2017-04-12 2799 * we are in the context of the process owning bfqq, thus we 6fa3e8d34204d5 Paolo Valente 2017-04-12 2800 * have the io_cq of this process. So we can immediately 6fa3e8d34204d5 Paolo Valente 2017-04-12 2801 * configure this io_cq to redirect the requests of the 6fa3e8d34204d5 Paolo Valente 2017-04-12 2802 * process to new_bfqq. In contrast, the io_cq of new_bfqq is 6fa3e8d34204d5 Paolo Valente 2017-04-12 2803 * not available any more (new_bfqq->bic == NULL). 6fa3e8d34204d5 Paolo Valente 2017-04-12 2804 * 6fa3e8d34204d5 Paolo Valente 2017-04-12 2805 * Anyway, even in case new_bfqq coincides with the in-service 6fa3e8d34204d5 Paolo Valente 2017-04-12 2806 * queue, redirecting requests the in-service queue is the 6fa3e8d34204d5 Paolo Valente 2017-04-12 2807 * best option, as we feed the in-service queue with new 6fa3e8d34204d5 Paolo Valente 2017-04-12 2808 * requests close to the last request served and, by doing so, 6fa3e8d34204d5 Paolo Valente 2017-04-12 2809 * are likely to increase the throughput. 36eca894832351 Arianna Avanzini 2017-04-12 2810 */ 36eca894832351 Arianna Avanzini 2017-04-12 2811 bfqq->new_bfqq = new_bfqq; 15729ff8143f81 Paolo Valente 2021-11-25 2812 /* 15729ff8143f81 Paolo Valente 2021-11-25 2813 * The above assignment schedules the following redirections: 15729ff8143f81 Paolo Valente 2021-11-25 2814 * each time some I/O for bfqq arrives, the process that 15729ff8143f81 Paolo Valente 2021-11-25 2815 * generated that I/O is disassociated from bfqq and 15729ff8143f81 Paolo Valente 2021-11-25 2816 * associated with new_bfqq. Here we increases new_bfqq->ref 15729ff8143f81 Paolo Valente 2021-11-25 2817 * in advance, adding the number of processes that are 15729ff8143f81 Paolo Valente 2021-11-25 2818 * expected to be associated with new_bfqq as they happen to 15729ff8143f81 Paolo Valente 2021-11-25 2819 * issue I/O. 15729ff8143f81 Paolo Valente 2021-11-25 2820 */ 36eca894832351 Arianna Avanzini 2017-04-12 2821 new_bfqq->ref += process_refs; 36eca894832351 Arianna Avanzini 2017-04-12 2822 return new_bfqq; 36eca894832351 Arianna Avanzini 2017-04-12 2823 }
on 2/23/2023 1:48 PM, Dan Carpenter wrote: > Hi Kemeng, > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Kemeng-Shi/block-bfq-properly-mark-bfqq-remained-idle/20230219-104312 > base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next > patch link: https://lore.kernel.org/r/20230219104309.1511562-18-shikemeng%40huaweicloud.com > patch subject: [PATCH 17/17] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge > config: openrisc-randconfig-m041-20230219 (https://download.01.org/0day-ci/archive/20230220/202302200841.9zinyY7i-lkp@intel.com/config) > compiler: or1k-linux-gcc (GCC) 12.1.0 > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > | Reported-by: Dan Carpenter <error27@gmail.com> > | Link: https://lore.kernel.org/r/202302200841.9zinyY7i-lkp@intel.com/ > > New smatch warnings: > block/bfq-iosched.c:2785 bfq_setup_merge() error: we previously assumed 'new_bfqq' could be null (see line 2766) > > Old smatch warnings: > block/bfq-iosched.c:6195 __bfq_insert_request() warn: variable dereferenced before check 'bfqq' (see line 6191) > > vim +/new_bfqq +2785 block/bfq-iosched.c > > 36eca894832351 Arianna Avanzini 2017-04-12 2751 static struct bfq_queue * > 36eca894832351 Arianna Avanzini 2017-04-12 2752 bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) > 36eca894832351 Arianna Avanzini 2017-04-12 2753 { > 36eca894832351 Arianna Avanzini 2017-04-12 2754 int process_refs, new_process_refs; > 36eca894832351 Arianna Avanzini 2017-04-12 2755 > 36eca894832351 Arianna Avanzini 2017-04-12 2756 /* > 36eca894832351 Arianna Avanzini 2017-04-12 2757 * If there are no process references on the new_bfqq, then it is > 36eca894832351 Arianna Avanzini 2017-04-12 2758 * unsafe to follow the ->new_bfqq chain as other bfqq's in the chain > 36eca894832351 Arianna Avanzini 2017-04-12 2759 * may have dropped their last reference (not just their last process > 36eca894832351 Arianna Avanzini 2017-04-12 2760 * reference). > 36eca894832351 Arianna Avanzini 2017-04-12 2761 */ > 36eca894832351 Arianna Avanzini 2017-04-12 2762 if (!bfqq_process_refs(new_bfqq)) > 36eca894832351 Arianna Avanzini 2017-04-12 2763 return NULL; > 36eca894832351 Arianna Avanzini 2017-04-12 2764 > 36eca894832351 Arianna Avanzini 2017-04-12 2765 /* Avoid a circular list and skip interim queue merges. */ > 114533e1e26a36 Kemeng Shi 2023-02-19 @2766 while ((new_bfqq = new_bfqq->new_bfqq)) { > 114533e1e26a36 Kemeng Shi 2023-02-19 2767 if (new_bfqq == bfqq) > 36eca894832351 Arianna Avanzini 2017-04-12 2768 return NULL; > 36eca894832351 Arianna Avanzini 2017-04-12 2769 } > > This now loops until new_bfqq is NULL. > > 36eca894832351 Arianna Avanzini 2017-04-12 2770 > 36eca894832351 Arianna Avanzini 2017-04-12 2771 process_refs = bfqq_process_refs(bfqq); > 36eca894832351 Arianna Avanzini 2017-04-12 2772 new_process_refs = bfqq_process_refs(new_bfqq); > > What?Sorry, I didn't expect that there is a behavior change. I will drop this one in next version. Thanks.
Greeting, FYI, we noticed maybe_for_address#:#[##] due to commit (built with gcc-11): commit: 114533e1e26a36efa829659b34941a78b158b613 ("[PATCH 17/17] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge") url: https://github.com/intel-lab-lkp/linux/commits/Kemeng-Shi/block-bfq-properly-mark-bfqq-remained-idle/20230219-104312 base: https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/all/20230219104309.1511562-18-shikemeng@huaweicloud.com/ patch subject: [PATCH 17/17] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge in testcase: blktests version: blktests-x86_64-f28eb90-1_20230214 with following parameters: disk: 1SSD test: block-group-07 on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (Skylake) with 32G memory caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): If you fix the issue, kindly add following tag | Reported-by: kernel test robot <yujie.liu@intel.com> | Link: https://lore.kernel.org/oe-lkp/202303141336.cc6f4cc8-yujie.liu@intel.com [ 96.679266][ T1230] general protection fault, maybe for address 0x7: 0000 [#1] SMP KASAN PTI [ 96.687702][ T1230] CPU: 3 PID: 1230 Comm: dd Not tainted 6.2.0-rc7-00473-g114533e1e26a #1 [ 96.695955][ T1230] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.8.1 12/05/2017 [ 96.704033][ T1230] RIP: 0010:bfq_setup_merge+0x210/0x460 [ 96.709428][ T1230] Code: 00 00 00 fc ff df 48 89 fa 41 0f 95 c5 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 ea 01 00 00 <a0> 00 00 00 00 00 fc ff df 44 03 65 04 44 29 e3 44 29 f3 44 29 eb [ 96.728893][ T1230] RSP: 0018:ffffc900028ef5a0 EFLAGS: 00010046 [ 96.734815][ T1230] RAX: 0000000000000007 RBX: 0000000000000001 RCX: 00000000fffcd90b [ 96.742646][ T1230] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88880532cb04 [ 96.750463][ T1230] RBP: ffff88880532cb00 R08: 1ffff11100f59f7f R09: ffff888802356093 [ 96.758284][ T1230] R10: ffffed110046ac12 R11: 0000000000000001 R12: 0000000000000000 [ 96.766100][ T1230] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 96.773919][ T1230] FS: 00007f6ad3490580(0000) GS:ffff888791780000(0000) knlGS:0000000000000000 [ 96.782694][ T1230] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 96.789124][ T1230] CR2: 000055822213cd38 CR3: 000000025d70c002 CR4: 00000000003706e0 [ 96.796943][ T1230] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 96.804762][ T1230] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 96.812583][ T1230] Call Trace: [ 96.815720][ T1230] <TASK> [ 96.818511][ T1230] bfq_get_queue+0x736/0xb40 [ 96.822953][ T1230] bfq_get_bfqq_handle_split+0x124/0x5c0 [ 96.828434][ T1230] bfq_init_rq+0x301/0x1780 [ 96.832789][ T1230] ? radix_tree_node_alloc+0x183/0x2c0 [ 96.839138][ T1230] ? elv_merge+0x144/0x3c0 [ 96.843405][ T1230] ? __bfq_insert_request+0x1850/0x1850 [ 96.849406][ T1230] ? _raw_spin_lock_irq+0x86/0xe0 [ 96.854279][ T1230] ? _raw_spin_lock_bh+0xe0/0xe0 [ 96.859065][ T1230] bfq_insert_request+0xdd/0x700 [ 96.864458][ T1230] ? bfq_init_rq+0x1780/0x1780 [ 96.869070][ T1230] ? ioc_find_get_icq+0x195/0x220 [ 96.873944][ T1230] bfq_insert_requests+0x12e/0x220 [ 96.878903][ T1230] ? blk_mq_get_new_requests+0x28e/0x500 [ 96.884381][ T1230] blk_mq_sched_insert_request+0x26d/0x450 [ 96.890035][ T1230] ? blk_mq_sched_bio_merge+0x390/0x390 [ 96.895430][ T1230] ? internal_get_user_pages_fast+0xfa/0x210 [ 96.901257][ T1230] blk_mq_submit_bio+0xb28/0x11d0 [ 96.906132][ T1230] ? copy_page_from_iter_atomic+0x1140/0x1140 [ 96.912045][ T1230] ? blk_mq_try_issue_list_directly+0x310/0x310 [ 96.918129][ T1230] ? find_next_iomem_res+0x239/0x470 [ 96.923261][ T1230] submit_bio_noacct_nocheck+0x481/0x630 [ 96.928739][ T1230] ? should_fail_request+0x70/0x70 [ 96.933701][ T1230] ? __cond_resched+0x20/0x90 [ 96.938226][ T1230] ? bio_add_zone_append_page+0x2b0/0x2b0 [ 96.943794][ T1230] ? get_page_from_freelist+0x6a4/0xc60 [ 96.949187][ T1230] submit_bio_wait+0xfb/0x1f0 [ 96.953714][ T1230] ? __bio_clone+0x300/0x300 [ 96.958163][ T1230] ? bio_iov_iter_get_pages+0xa2/0x250 [ 96.963476][ T1230] ? bio_init+0x31b/0x580 [ 96.967663][ T1230] __blkdev_direct_IO_simple+0x3ef/0x710 [ 96.973149][ T1230] ? __blkdev_direct_IO_async+0x6f0/0x6f0 [ 96.978727][ T1230] ? current_time+0x77/0x220 [ 96.983171][ T1230] ? mode_strip_sgid+0x170/0x170 [ 96.987956][ T1230] ? submit_bio_wait+0x1f0/0x1f0 [ 96.992742][ T1230] ? folio_add_lru_vma+0x74/0xa0 [ 96.997530][ T1230] blkdev_read_iter+0x1f9/0x550 [ 97.002230][ T1230] vfs_read+0x577/0x800 [ 97.006237][ T1230] ? kernel_read+0x130/0x130 [ 97.010679][ T1230] ? __fget_light+0x51/0x220 [ 97.015120][ T1230] ksys_read+0xf1/0x1c0 [ 97.019124][ T1230] ? __ia32_sys_pwrite64+0x1e0/0x1e0 [ 97.024258][ T1230] ? fput+0x1d/0x130 [ 97.028004][ T1230] do_syscall_64+0x39/0x80 [ 97.032271][ T1230] entry_SYSCALL_64_after_hwframe+0x5e/0xc8 [ 97.038013][ T1230] RIP: 0033:0x7f6ad33a678e [ 97.042279][ T1230] Code: c0 e9 b6 fe ff ff 50 48 8d 3d ee 04 0b 00 e8 a9 fd 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28 [ 97.061718][ T1230] RSP: 002b:00007ffd930cfb08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 97.069974][ T1230] RAX: ffffffffffffffda RBX: 0000000000001000 RCX: 00007f6ad33a678e [ 97.077794][ T1230] RDX: 0000000000001000 RSI: 000055822213a000 RDI: 0000000000000000 [ 97.085616][ T1230] RBP: 000055822213a000 R08: 0000558222139d30 R09: 00007f6ad3489be0 [ 97.093436][ T1230] R10: ffffffffffffff3f R11: 0000000000000246 R12: 0000000000000000 [ 97.101257][ T1230] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000004 [ 97.109078][ T1230] </TASK> [ 97.111955][ T1230] Modules linked in: null_blk loop dm_multipath dm_mod btrfs ipmi_devintf ipmi_msghandler blake2b_generic xor raid6_pq zstd_compress libcrc32c intel_rapl_msr intel_rapl_common sd_mod t10_pi x86_pkg_temp_thermal crc64_rocksoft_generic intel_powerclamp crc64_rocksoft coretemp crc64 sg kvm_intel i915 kvm irqbypass drm_buddy crct10dif_pclmul intel_gtt crc32_pclmul crc32c_intel drm_display_helper mei_wdt ghash_clmulni_intel ahci ttm sha512_ssse3 rapl libahci wmi_bmof intel_cstate mei_me drm_kms_helper i2c_i801 syscopyarea intel_uncore mei sysfillrect libata video i2c_smbus intel_pch_thermal sysimgblt wmi intel_pmc_core acpi_pad drm fuse ip_tables [last unloaded: null_blk] [ 97.172592][ T1230] ---[ end trace 0000000000000000 ]--- [ 97.177897][ T1230] RIP: 0010:bfq_setup_merge+0x210/0x460 [ 97.183291][ T1230] Code: 00 00 00 fc ff df 48 89 fa 41 0f 95 c5 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 ea 01 00 00 <a0> 00 00 00 00 00 fc ff df 44 03 65 04 44 29 e3 44 29 f3 44 29 eb [ 97.202748][ T1230] RSP: 0018:ffffc900028ef5a0 EFLAGS: 00010046 [ 97.208673][ T1230] RAX: 0000000000000007 RBX: 0000000000000001 RCX: 00000000fffcd90b [ 97.216507][ T1230] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88880532cb04 [ 97.224335][ T1230] RBP: ffff88880532cb00 R08: 1ffff11100f59f7f R09: ffff888802356093 [ 97.232157][ T1230] R10: ffffed110046ac12 R11: 0000000000000001 R12: 0000000000000000 [ 97.239977][ T1230] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 97.247798][ T1230] FS: 00007f6ad3490580(0000) GS:ffff888791780000(0000) knlGS:0000000000000000 [ 97.256574][ T1230] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.263007][ T1230] CR2: 000055822213cd38 CR3: 000000025d70c002 CR4: 00000000003706e0 [ 97.270826][ T1230] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 97.278649][ T1230] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 97.286471][ T1230] Kernel panic - not syncing: Fatal exception [ 98.355008][ T1230] Shutting down cpus with NMI [ 98.359536][ T1230] Kernel Offset: disabled To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests sudo bin/lkp install job.yaml # job file is attached in this email bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run sudo bin/lkp run generated-yaml-file # if come across any failure that blocks the test, # please remove ~/.lkp and /lkp dir to run from a clean state.
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 2705a24ab146..037f73a25567 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -2752,7 +2752,6 @@ static struct bfq_queue * bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) { int process_refs, new_process_refs; - struct bfq_queue *__bfqq; /* * If there are no process references on the new_bfqq, then it is @@ -2764,10 +2763,9 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) return NULL; /* Avoid a circular list and skip interim queue merges. */ - while ((__bfqq = new_bfqq->new_bfqq)) { - if (__bfqq == bfqq) + while ((new_bfqq = new_bfqq->new_bfqq)) { + if (new_bfqq == bfqq) return NULL; - new_bfqq = __bfqq; } process_refs = bfqq_process_refs(bfqq);