From patchwork Tue May 22 07:08:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jianchao.wang" X-Patchwork-Id: 10417393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C882E6016C for ; Tue, 22 May 2018 07:07:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B863C28B40 for ; Tue, 22 May 2018 07:07:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB77928B3E; Tue, 22 May 2018 07:07:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3534728B3E for ; Tue, 22 May 2018 07:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751160AbeEVHHV (ORCPT ); Tue, 22 May 2018 03:07:21 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:43988 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbeEVHHU (ORCPT ); Tue, 22 May 2018 03:07:20 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4M76O40065385; Tue, 22 May 2018 07:07:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=TurA74eM277vUANgRwDa3TIdM2C7wjzPgzt6vEYyv9E=; b=WGBYxbtHK3gxiYQlV5til0ezT0UL/oBm45cl9kVlDs1PU8PqnBwFRpiRvPiClSuHQojx vQV78xgLNb3qocPdf0unbr0e4clQqr3KeFnq0crfXgFFpD0jwSZlq+4yzBsd+T7aKIlZ 0m36HJjdUR4YL51zRYmCnmmQ1Ef9xFXr4hm09eKM+ENKc62p9cbUpwV8w/DWEHBxV5jf IHdCssAgUTFAce/pWflv5exI3Qb9uKIlv9vheDLchAfQmdxzYAdpkJHHNao9StxzbZNZ 4gevvbSc6p4SfL1Oef2zlNfyVBk0ox/ZsQBnOAsnZe52tYETDL1UwLBSs5W4E4w4nNuz Aw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2j29eyfatr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 May 2018 07:07:17 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4M77Gka027797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 May 2018 07:07:17 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4M77GxT007184; Tue, 22 May 2018 07:07:16 GMT Received: from will-ThinkCentre-M910s.cn.oracle.com (/10.182.70.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 22 May 2018 00:07:16 -0700 From: Jianchao Wang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] blk-mq: add plug trace event for multiple hw queues case Date: Tue, 22 May 2018 15:08:10 +0800 Message-Id: <1526972890-1878-1-git-send-email-jianchao.w.wang@oracle.com> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8900 signatures=668700 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=972 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805220085 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no plug trace event for multiple hw queues. This is confusing when check block trace event log and find unplug one there. Add plug trace event when request is added to a empty plug list. Signed-off-by: Jianchao Wang --- block/blk-mq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 9ce9cac..ddf726a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1935,6 +1935,9 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) same_queue_rq = NULL; if (same_queue_rq) list_del_init(&same_queue_rq->queuelist); + else + trace_block_plug(q); + list_add_tail(&rq->queuelist, &plug->mq_list); blk_mq_put_ctx(data.ctx);