From patchwork Wed Jul 10 04:02:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11037775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6002138D for ; Wed, 10 Jul 2019 04:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8781288E6 for ; Wed, 10 Jul 2019 04:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CD0A288EC; Wed, 10 Jul 2019 04:03:03 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 4D897288E6 for ; Wed, 10 Jul 2019 04:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbfGJEDC (ORCPT ); Wed, 10 Jul 2019 00:03:02 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:47825 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbfGJEDC (ORCPT ); Wed, 10 Jul 2019 00:03:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562731383; x=1594267383; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=nL2Cp9xIWa4DFndjGytItZxL7ccXH8n5IsZyR6KogdM=; b=QV/bLBNArh55T8YxDQCOIlI8pLGgkHKpG/bV/Pu3LZVrp9llrK3j7s9s wNpcDGx6HoE4cgI+7r+OtEzkwF/j3mp1TMgNk5BHYTVDivnxySMXkXpwJ N0piBaspsieCPwgbnw/uqScEfnqUjGgFpqQUH/FvsaTVmdRFSMZewpyOi A5HRwKWzzdN7PF4koeo4gGDjNT9PZ5LbaP8CJrV0TMkukqWG5l33wh+gL Yvr3F4Y62OIRc7SOKaugtsEQoAkQs4YnDkRMf2uwRddsYuAuBDWYKE3dX /Gacu6NUUIB/jXdX+BihVQgiC82Hoeoh8jAPBQq9+2e22JZFBLyRHMsZN w==; IronPort-SDR: Xuc+EqHe7ENMN2qy6/J7lbomAbmEMa3mfLwOpGzhi7qGX+mBv4Wj8XzqlUvQ8FUEMzvXWzAJan /0kkOqBRdDS9RHFpr9IFw6wvUNtP3RzYHqNdYw+NjWazVLz45sigAUVtO/+BYPrXl4IktG1YHx xkEXCo94uQ4Jy3o59ItTfk0fCDvf/Xr2DWfhWZzl13NpNjuil5VpED9dJilMx2nZyoQ5lQ6OnW 69SoruqqTO+cecvDoTuXf1cc3EOomPPUpTvPePcAnMaL7O7ZpZp1TE1kRwb8oynBjIAFbn0O2m Eg8= X-IronPort-AV: E=Sophos;i="5.63,473,1557158400"; d="scan'208";a="117438991" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Jul 2019 12:03:03 +0800 IronPort-SDR: 0Cj+9JBwxbrOaL7tNujq7JmlHVw67dhEzSG3pLdw/sCMukBJPHTAjqaL+yJcscWOZdtydwiwmj kWHTA0Ar+MTInH0rWti/olOCVFw5H6wST1FfPOh+o69SRoO1lp+wVuR61uNzoXSKFlXChTCYku 3x5nmBWSIqFf0WSJF1YW9Niu39iZ5NO3q7MqdvJBxbEBfzbylOEzAwPCJE1kJJBh6dKj7UyPzd 2rK6qJ/5tgkBEPEJeCS70SIoDICalLC9rXfAx+FY8h0mPAklBY8FbJTuNcXS8d4tESxki0BVGK tmaw3K/0k8cJwzvvoX5jxl0u Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 09 Jul 2019 21:01:48 -0700 IronPort-SDR: /X8Vt+Zq18Bwb2coxNIrxojPf8Yo13KFVlKeJ7Yl0ujah481Pl5HgfY8AfKhI34FQwSnHGQMKq UFu+bqlYqf8IAcI588VxqgOx+6as4TEizZ5FBBOzyCI8MA4J+XOZxGl2+98QJYUkyR7HcDSfUZ ihK7T8zuuX3MJioSPsmJObknPRQekH6dpENmAQxMSY2QqoVx1adDx2U8Nb6kMIkONBc68BQxXh Oet6XllqptIzuFez5WVlboHC0676TvOt5dL4mhG6fkZZrwHsDu9oID/kk2HvWP3k6khoTaezo6 YE8= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Jul 2019 21:03:02 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: Chaitanya Kulkarni , axboe@kernel.dk, hch@lst.de Subject: [PATCH 1/3] block: set ioprio for zone-reset bio Date: Tue, 9 Jul 2019 21:02:22 -0700 Message-Id: <20190710040224.12342-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> References: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> 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 Set the current process's iopriority to the bio for REQ_OP_ZONE_RESET. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen --- block/blk-zoned.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-zoned.c b/block/blk-zoned.c index ae7e91bd0618..0bd7981e9535 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -249,6 +249,7 @@ int blkdev_reset_zones(struct block_device *bdev, bio->bi_iter.bi_sector = sector; bio_set_dev(bio, bdev); bio_set_op_attrs(bio, REQ_OP_ZONE_RESET, 0); + bio_set_prio(bio, get_current_ioprio()); sector += zone_sectors; From patchwork Wed Jul 10 04:02:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11037777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 899C0138D for ; Wed, 10 Jul 2019 04:03:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B0C3288E6 for ; Wed, 10 Jul 2019 04:03:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F367288EC; Wed, 10 Jul 2019 04:03:17 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 2426E288E6 for ; Wed, 10 Jul 2019 04:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbfGJEDN (ORCPT ); Wed, 10 Jul 2019 00:03:13 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:6843 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbfGJEDM (ORCPT ); Wed, 10 Jul 2019 00:03:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562731393; x=1594267393; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=lha345VPWEluSrVvFGkyYRW7XQMD3aEhi6Xbrftcjvs=; b=b3oVVzeAX0v6pVzdYIM2qQRQidV0KRQG1SMv4uQi1iQWT/3kPQn5ZY2Y A0byZMBEXw0Tb9YY9ygpwEAkQbqDx4JDe5ya7ntFFsIPPOGGcOybrr1b9 DCaNaq1FOOclKD/FFtmTsLS9G37sG8vX0aCK14ktobPJtvc4rN1TYm4KF W4+vuwpSMl+wRIPZqxyCwgwwrExAygn3pXFmFae8CZOQnhedG6IK+498D 6F1kRbmouxOkbkyEVzNOCAR2evz29t0IbtDeHTLncitYj9gU1aaatw6dK Xcfn+lpcADktKkv9TtrvOtIC3ZyMnEk9LbyExGabiOF0q9+4b0bHbex7w w==; IronPort-SDR: +84oQg1qLtNAl13DxbVvE+MRPgcj2JuYjU7k7HoijtuTTBfeQ759R3r8daYpkawk+0AufGhhpX SR483kWwAlbQPhyTppKUyiguaT+UlyzYMSobLPepRHdTiNtNG3tA2VqNQh/82XbrU8pbW9l6SE M2BgF2qUzONCbW9MYkmVtVzAiPAcBi/9uyrMLpqhsTDNTYo/qQFZRZehDRGzxgUb/wyH9myO8A hSdXgjr8kTlRTZUN3TmzJRLg4BED7CvXi3kXob2F69mDsMCYPELnCvwFQSxPtYGga4E6vkNzqX JcM= X-IronPort-AV: E=Sophos;i="5.63,473,1557158400"; d="scan'208";a="113789908" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Jul 2019 12:03:12 +0800 IronPort-SDR: nMSXNz0C5OTD1tlOzIJumtORaoS24k4rz90tyAkL5hPo9gS+DX/ZEwWeId6GGwI7DQfVddlY7w Ii8OFP4aYPl+RE9kbEV7pda3bFON/l/hm0Oylkzed+u7/ZmE57K+ggWoAo19rqrzpiTMt0lJpv NliaRfIQ5bQ+Hak7iYqibMmfJ9ovH5pKeupMbstwFx51avrTqVcma12bKtgxm8pN4uf3siIWkQ o44i+1wZny1clzVCco6EZy6SFYC2HtYVIWPGu7areZRJZ4VoTs8MyizsBp8pihz8LE8Hbwk8+u N+9g60ulDrdTw0l4BckkXWpb Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 09 Jul 2019 21:01:58 -0700 IronPort-SDR: 43OrMaMz3sSXFSSVMxhUmwD3yiuMFaUyvouZ/FxtVMQbRCi0WgDnE54Sr8qSX1D43BZihGpBhp qfLQve7h/exwrCmcLVlhT/02C6KmEUDiJTx5iJ/EJOcxoxuIrx+wYV3g/1IFc1vRc8j04WlHoc zUieXQN/dMRtYnroPdbRl0WNjdrtvtQqGy4lKXO+Zi+mXnjEnc8m756pNWaqA7tAz0Rp25kObn CXIx3guTvSJ/YJadmoFn3shB6XLioUdZJIph/1+aExa+cdI9FT7sWCuSIfipnaE93wXWaG6gyj fvY= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Jul 2019 21:03:12 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: Chaitanya Kulkarni , axboe@kernel.dk, hch@lst.de Subject: [PATCH 2/3] block: set ioprio for flush bio Date: Tue, 9 Jul 2019 21:02:23 -0700 Message-Id: <20190710040224.12342-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> References: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> 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 Set the current process's iopriority for flush bio. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen --- block/blk-flush.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-flush.c b/block/blk-flush.c index aedd9320e605..21013fcdf42c 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -69,6 +69,7 @@ #include #include #include +#include #include "blk.h" #include "blk-mq.h" @@ -445,6 +446,7 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, bio = bio_alloc(gfp_mask, 0); bio_set_dev(bio, bdev); bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; + bio_set_prio(bio, get_current_ioprio()); ret = submit_bio_wait(bio); From patchwork Wed Jul 10 04:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11037779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2AE87912 for ; Wed, 10 Jul 2019 04:03:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D125288E6 for ; Wed, 10 Jul 2019 04:03:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 105F8288EC; Wed, 10 Jul 2019 04:03:34 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 AD7C0288E6 for ; Wed, 10 Jul 2019 04:03:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbfGJEDd (ORCPT ); Wed, 10 Jul 2019 00:03:33 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:6854 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfGJEDd (ORCPT ); Wed, 10 Jul 2019 00:03:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562731412; x=1594267412; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=hUvdRy+/KdHolAGjVHQl4o3RvlK2spNjtcqD7idebbw=; b=SdQw4vGsaZImxnfA/nt0cUb7G620uFqo3mIKVkdrdrbmQIsIgVbLWi3R RowGgOjIut/8PJtEdL0rl2c6TsC7Qm16Nl5+yd0Ac24KrfcDKrIyn9pWK /7GcT/Ryo6WCvT36q/5iFmtAWuhreddE8OLDg9DhsYsxoFuj3v7ZQSlyF 6gca/Ynow5PDY6BvcHfgFZX1yo/4ddlz2E/9k3R5mGlkOHp/U4CkVu4As Wne7WSFdJZCrhybOn8OoFi5zvaVwA0zuZGbf4zYF07a9fqvOhnhueAyav GuUbkjsDWRedDbANs8KnRaqYINaQ0xCCqsG7hQ9IhwBuqkgk451zA0/tP A==; IronPort-SDR: rVtriZaRWr7AcZFhVeLyjmW6pEL3zjmDCLFUqMX/5pqcKcywrCZppRhhk4LJlr/gXhmG8ah7SE 8pnPMJM9uXyfc2eR7HP3BKAmIxaHCUpHDtcCoK2gkWgqdO3HQzDsqcNhDaoNHnjYk/6GvexxJR Ghu7TZbV1RJclfUAwsx2k4Io/EoPtqsGs0EQUQgwEuz6L4/Sf+b4tiC+RkIJEnuOjX+AfVUSas +nOXHUXdJuczpXWAzSZol3qhqFtIMGZeY0v8lixO+h7fA5NyNHd7UVCLOa2x/BQGtr9QlcD6d6 U2w= X-IronPort-AV: E=Sophos;i="5.63,473,1557158400"; d="scan'208";a="113789921" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Jul 2019 12:03:24 +0800 IronPort-SDR: EXT0oIBJaRutpLrCIxi+g103xrphUpEdZ45o8FmA0olTaIcGQgfrZl9FUDN+JpRHBwgU8AhHZm KJiEGzkk1/oEtPBP+N5TIXTEP4r6OPOO7VQfhXlwOEy1yvV24+3DB2wr81UkwAHXbfkiQCb3/z yIcu2l1xaBnudsqGgCbPY36Euyfh+bf7iFu+fkhHJT3BvlHxpMewV1s4HCZEDWxszv9kHgrpm4 wucjnWCAMDatYSx6IvRB8Yb2cL2MjvzPEMNAK4uhlJVRptDufmjt9befC/WJu8Fx+3tXea3+4q hZaOps0xz43xO6RASHluAI+o Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 09 Jul 2019 21:02:10 -0700 IronPort-SDR: volrXMRRY8gj8n1c+OXTreexEVpouxkjb2vHjRY6IrHYuTBvHBkhLQVnWbPbjGUYqViubIBM4g UH1PyCU8fNHGADCiNzBckw/f2wNPwux8NLvfQ3fW0ekzs5nCYqQ78Pst74xeDfXSwI5dxI89dn yDA7Z0CCSxd/HU0c7HiSPY85Wlx+FCNi6RmzaOIpr/l5Jwrne9MDACM+lLE5FZrA4wSapYiwCd NC/SjuhtJDmWhZPxWUxbqjMZIcbCkoHyzuFGxIm+VXQaMWq357PcpEpYgimZ4gQ6rNQvQ3OecY hd4= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Jul 2019 21:03:24 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org Cc: Chaitanya Kulkarni , axboe@kernel.dk, hch@lst.de Subject: [PATCH 3/3] block: set ioprio for write-zeroes, discard etc Date: Tue, 9 Jul 2019 21:02:24 -0700 Message-Id: <20190710040224.12342-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> References: <20190710040224.12342-1-chaitanya.kulkarni@wdc.com> 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 Set the current process's iopriority for discard, write-zeroes and write-same operations. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen --- block/blk-lib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block/blk-lib.c b/block/blk-lib.c index 5f2c429d4378..efc9a1bf5262 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "blk.h" @@ -64,6 +65,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, bio->bi_iter.bi_sector = sector; bio_set_dev(bio, bdev); bio_set_op_attrs(bio, op, 0); + bio_set_prio(bio, get_current_ioprio()); bio->bi_iter.bi_size = req_sects << 9; sector += req_sects; @@ -162,6 +164,7 @@ static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector, bio->bi_io_vec->bv_offset = 0; bio->bi_io_vec->bv_len = bdev_logical_block_size(bdev); bio_set_op_attrs(bio, REQ_OP_WRITE_SAME, 0); + bio_set_prio(bio, get_current_ioprio()); if (nr_sects > max_write_same_sectors) { bio->bi_iter.bi_size = max_write_same_sectors << 9; @@ -234,6 +237,8 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev, bio->bi_iter.bi_sector = sector; bio_set_dev(bio, bdev); bio->bi_opf = REQ_OP_WRITE_ZEROES; + bio_set_prio(bio, get_current_ioprio()); + if (flags & BLKDEV_ZERO_NOUNMAP) bio->bi_opf |= REQ_NOUNMAP; @@ -286,6 +291,7 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, bio->bi_iter.bi_sector = sector; bio_set_dev(bio, bdev); bio_set_op_attrs(bio, REQ_OP_WRITE, 0); + bio_set_prio(bio, get_current_ioprio()); while (nr_sects != 0) { sz = min((sector_t) PAGE_SIZE, nr_sects << 9);