From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ACCDC55186 for ; Wed, 22 Apr 2020 10:38:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BF2020656 for ; Wed, 22 Apr 2020 10:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587551881; bh=aWAXO2NOidbzbTCCk/CUCUqwMnMHKbmmDl/JPB73t+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hgcyIDZZwFMvE1nPZMe8HLoyUAjnYA7wtxx2lJ1sXtIj/RRKFvWxnjNWZ+xSmGe8i dCJ7GG8mc/OXOvUuybLAQGxTwdZ9diUZRadMzldbI5Y1aZA77NuIefpZxH92Zc0Tc0 ER/neeVT97h2I5bbBoHcS9VHz6Zfq+IOYPEwz/lY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730919AbgDVKiA (ORCPT ); Wed, 22 Apr 2020 06:38:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:58588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729953AbgDVKWZ (ORCPT ); Wed, 22 Apr 2020 06:22:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E660221556; Wed, 22 Apr 2020 10:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587550938; bh=aWAXO2NOidbzbTCCk/CUCUqwMnMHKbmmDl/JPB73t+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bKS+H8/JjjVNU0lV7jLy1l0d0rQXveT150W7Z4G1f2DScZLzq35Ct1fMwOYUtWhYb CQXg/fUDiuMB0vvfOAQ10BXWh8RJR1+UYS0CVs3UB6UCx16/8hvB6GFA0mbxeymEp+ GTfWovOxzFyMKgpocsPaFLS+AWdNJzl3Wq1nspAI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, cki-project@redhat.com, Paolo Valente , Jens Axboe Subject: [PATCH 5.6 036/166] block, bfq: turn put_queue into release_process_ref in __bfq_bic_change_cgroup Date: Wed, 22 Apr 2020 11:56:03 +0200 Message-Id: <20200422095052.694362148@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095047.669225321@linuxfoundation.org> References: <20200422095047.669225321@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Valente commit c8997736650060594845e42c5d01d3118aec8d25 upstream. A bfq_put_queue() may be invoked in __bfq_bic_change_cgroup(). The goal of this put is to release a process reference to a bfq_queue. But process-reference releases may trigger also some extra operation, and, to this goal, are handled through bfq_release_process_ref(). So, turn the invocation of bfq_put_queue() into an invocation of bfq_release_process_ref(). Tested-by: cki-project@redhat.com Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/bfq-cgroup.c | 5 +---- block/bfq-iosched.c | 2 -- block/bfq-iosched.h | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -714,10 +714,7 @@ static struct bfq_group *__bfq_bic_chang if (entity->sched_data != &bfqg->sched_data) { bic_set_bfqq(bic, NULL, 0); - bfq_log_bfqq(bfqd, async_bfqq, - "bic_change_group: %p %d", - async_bfqq, async_bfqq->ref); - bfq_put_queue(async_bfqq); + bfq_release_process_ref(bfqd, async_bfqq); } } --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -2716,8 +2716,6 @@ static void bfq_bfqq_save_state(struct b } } - -static void bfq_release_process_ref(struct bfq_data *bfqd, struct bfq_queue *bfqq) { /* --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -955,6 +955,7 @@ void bfq_bfqq_expire(struct bfq_data *bf bool compensate, enum bfqq_expiration reason); void bfq_put_queue(struct bfq_queue *bfqq); void bfq_end_wr_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg); +void bfq_release_process_ref(struct bfq_data *bfqd, struct bfq_queue *bfqq); void bfq_schedule_dispatch(struct bfq_data *bfqd); void bfq_put_async_queues(struct bfq_data *bfqd, struct bfq_group *bfqg);