From patchwork Wed Aug 21 06:11:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11105463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2821112C for ; Wed, 21 Aug 2019 06:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0BBC2339E for ; Wed, 21 Aug 2019 06:12:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="jFUDCj/R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727704AbfHUGMH (ORCPT ); Wed, 21 Aug 2019 02:12:07 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:46795 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbfHUGMG (ORCPT ); Wed, 21 Aug 2019 02:12:06 -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=1566367926; x=1597903926; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=pkSKnUyLKuEm0+rCqbuqfjLUYzLq6qcBdWjO6y3X84E=; b=jFUDCj/Rz+nAOe3Ayc6FsHFjYAFgZOfN9KpoHbmJV03XuyKDUMeOO+PZ Hv1QKlFCl/ZpYaNlJSuclPjf49IdYPFC7kdjlF0tWg2QdX9T8KiA73ZyN oWajwfjiG36hw/8rur+bDlkOYCKtqX5Q1ZQYF9qWFYbXPOx6OdRYGqzg8 DIbubt7Vxo2zaQV1kJ7ovRGjIP8hVra9wwh09/Jj04k2rgs/P+N1Kc1LA 1dznHKc+zE44yvCo1brlwhD1KZibj89xtXwHx6eFLD98qvXWt1g1/Ohqv xPkWULkc2h6x+hD+lYM02HQzKEfiGm2K/iaIFbw0FjGQsDehAVsk5EDH0 w==; IronPort-SDR: mjBtJvuuzUuYBgAIU7TJIq6ETHzP3oc/t3aH3AFzSOGujvBEAPaA7oAohoLeGm8UektYySyeyO i6TZBBesrCElRPW6HxsY11RZSmZ99K8beEGJ9DpvyZtMrOPh9ZW1Mc1ZTsA5MFMpDhWK7Bls0h fqjqFv2GhXQBsrxCMR/6L2FXLcQCLct97CxNpjtBUewmkLwmoArisIHAKOJA28KJ9idFfSS4k4 KKScgEwmEcIKSOedC8/wdfOKbrDvOo5GYl9dzYIzZ/y0GrAwL1gvVNFNlKAYG7w26zvM7x58m1 qcw= X-IronPort-AV: E=Sophos;i="5.64,411,1559491200"; d="scan'208";a="222880644" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Aug 2019 14:12:06 +0800 IronPort-SDR: /Zcqaap36ZdqO8XxRP2AIjRdXD3tPaScUtMwfeVsffobbMcbw33N47TYzaUOcod3awtfrho66o DJu1xXtOaq+TsjAV2IBImCm/sZdsH5hne4GhFtwqzfHcidPC48X9iMAbwFX1XEaKnn1N4PWFf/ tNNh5sWQOKJh+SptcUNMCGMPDF2ix+rJjlIA/lfSC2HK4WX8KJn53qr/F/mQoVYKn9U+r3+Tki DpiWG+2LcNuoTAhC1ly+Wbjo+CU3CTgqy0+/O8HHLETk41FVnAqhipGcBDhC1pIpAoSpG6JXvW C2y5EbV3Sa57prflK43JHD5R Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 23:09:27 -0700 IronPort-SDR: gaol3yHL7M2d3mOEXfON3s8nndUFoilpi34YuaQm+Ll0LgtzBij5CyNwLnotQAGppOSBM+h+yX x9uGiHlRU/zxkgO3/AHcmvvSp40ySjFid8rhYiXX6BjxRmvkRi/oLoUBvagwblfylUKjrHPDTD GnVsgv5C+Nh1fnp0fbLE6RUMY7fzyHYgRJ3TdgTN3jHB2tcl3aw6G6E6prT3hWJnsAd5QTwmL7 SDbja4wkhcs3fSSf6S/RsSg1QMam3JmlJPnqL7hqpcNLyrAkRb+l1M1I15N1se3hgJb7swuBVO Jok= WDCIronportException: Internal Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Aug 2019 23:12:06 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH V2 1/3] block: set ioprio for zone-reset bio Date: Tue, 20 Aug 2019 23:11:54 -0700 Message-Id: <20190821061156.3127-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> References: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Set the current process's iopriority to the bio for REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL. Reviewed-by: Martin K. Petersen Signed-off-by: Chaitanya Kulkarni --- block/blk-zoned.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 4bc5f260248a..741759b5e302 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -214,6 +214,7 @@ static int __blkdev_reset_all_zones(struct block_device *bdev, gfp_t gfp_mask) /* across the zones operations, don't need any sectors */ bio_set_dev(bio, bdev); bio_set_op_attrs(bio, REQ_OP_ZONE_RESET_ALL, 0); + bio_set_prio(bio, get_current_ioprio()); ret = submit_bio_wait(bio); bio_put(bio); @@ -290,6 +291,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 Aug 21 06:11:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11105465 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A245112C for ; Wed, 21 Aug 2019 06:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDADD2339E for ; Wed, 21 Aug 2019 06:12:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="MVYTaY+a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727793AbfHUGMM (ORCPT ); Wed, 21 Aug 2019 02:12:12 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:46795 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbfHUGMM (ORCPT ); Wed, 21 Aug 2019 02:12: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=1566367931; x=1597903931; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=IQBOi/8x2aPXJQodxMci9ho96QkK0SGrpMvvwAC0Yto=; b=MVYTaY+axZIwZq2Z5fN06ikEaYgy7nDfDynlxSbCunfTeO77hO/cvK4z UtyYQX+CQIEPcg1jJLo01zWCtAYCZkZTT5Ocm+/p2+Ynsdfy7ci4eHUBi Bh5koo1wogCVGzRB4JeCCh6ABWTBsQgkP+KkpiRNmRkJnDHiclMynPnP9 fTAEK9/9nFq8zOmbD55gNVXYFF3yEwdRvE0d0hT7K+IdP+SFATdNrdlZp 9RURLQBlsqEE7alxrb7qzzZ2pK7v6kn2JWNbIjbLP0Xc3eYoPMVhlN6LQ HoOELsXDpGz7i1kBp1r3V3gMD/WxJqIQoq7ZBAdEnfQSPMZSOLBaThdkV w==; IronPort-SDR: l6h9q+UQNcygL/sw5ISEVwJuagVrFScnT0LcYS7/hlbcfe7D1vZc4suRg8bLLtY+duz94IaO7x TdalDAjisYYOPI72xRa6LfscQH2oDqWSV3IVDgVJ4Qt1heiPZyX7zOezoZIVJBT9tpHEHH9Z5D mwz6D+nyshQWoQc5PjdFeV/Awqs9pEdQe8PZKz+7BQRdGFIHhf85JREnQz55gSuutzUHIIZPIr 2PIOY05cMHTQRTsnuQaOVGngGqEPJQkH1/PnH8twP2l7np7IIuYxX3DGPrjkzrw3uDDpOWRSt9 pYk= X-IronPort-AV: E=Sophos;i="5.64,411,1559491200"; d="scan'208";a="222880648" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Aug 2019 14:12:10 +0800 IronPort-SDR: T2KdlgKrX1nPg/2Y3uANxYe3qPeIN/uJ2bS+HOZ7Rc1kCkHmSuXVrI0w830oWcKVSjs+tIPMkq ApRv02fIqcQRd0KTq7lJYj2g8DaXLPvMMUHiBZ0a3my+G78gYazo5wAV5ujSUahas07YjzIGuW 2UmEFyV4/M4yUP2AuoU/GXBV1/a5g4akLJjgIOWML0abmdf4JWXACE/TN2QLKDI8acVZXyihhm Zeh1mcXPL5Lb1/dwBWw50+il/c0wItDNwJEGmrvE1HV0NPVJVRwJRTdTYcQxIsZqMxhLbmEYVZ 3DhApw1f14UQ3+0RTJfz3+Tj Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 23:09:32 -0700 IronPort-SDR: AIMcuy8tdm6xX8+Jt0W34QdH3QJwXPMUaMbGUq3eMZr7Uj83yeOf3a12DwieIpMVdntIIx4TFk 8mWJOWbw2sxE0l1HQc8ALAHi0OHr51VwvYI9Y26CZXfy8lLsC28R4xRB11cPBA+hL3AdqMbzwT Rv3mvRirvY5N9IOgwlWwrKktBykOdcjL1EDGhSKQnzqrCBzpJQpBuBk4i1E452FD3c8yR5EXWo 3Ij6CkvLZ09tkv1uX697Rfxtu/Kc6KZmDH98LuV3jAq8Ncp8T9UOiuSQr9RUXokpzjqqSDNqWM dHk= WDCIronportException: Internal Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Aug 2019 23:12:10 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH V2 2/3] block: set ioprio for flush bio Date: Tue, 20 Aug 2019 23:11:55 -0700 Message-Id: <20190821061156.3127-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> References: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Set the current process's iopriority for flush bio. Reviewed-by: Martin K. Petersen Signed-off-by: Chaitanya Kulkarni --- block/blk-flush.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-flush.c b/block/blk-flush.c index aedd9320e605..642a01b72a8b 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -445,6 +445,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 Aug 21 06:11:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11105467 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD4E814F7 for ; Wed, 21 Aug 2019 06:12:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB77022D6D for ; Wed, 21 Aug 2019 06:12:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="L9thsney" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbfHUGMQ (ORCPT ); Wed, 21 Aug 2019 02:12:16 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:46795 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbfHUGMP (ORCPT ); Wed, 21 Aug 2019 02:12:15 -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=1566367935; x=1597903935; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=+CgoZ/ocgNTcJulImr9CQRjUBIQXXYEnN/SGKq6sN0A=; b=L9thsneyQ2NpAkJntZxSiAV/KsaUZfENhWaO9UHIu4JKTaad33SFi4/W A5iIs0aWZ2f66CzHUqITZRnLiHt0Cf17CMmmcLKMWeLNsqe/Kk0t6/5jI cu8MaxRC46J5g9pAAVT4Q5VjW8cEepaOf4EGj1rItF0sHjHg+GxEC5jXf qh3l+NnUWsmaiHnWH9WZIfBgIs2zErPe2ph9hYh/U4+bmQJOUpUvMPzok O/psDPavD+S4YGzGMC9WqgLWz0fuhQqJT7gRDqPY6STfQyNLbHlKy/IJ+ 5I8EMyK3mEmzYTTbzf1wuTqstzDBpJfVs/zg57wKNUcy5pQaxbXXLasqt A==; IronPort-SDR: idT4I6Fc0qhb3Ee8FQ+uQIvGfwUeyKb8oTQB0sGxIeZodY0Dbjo9pRiV4+D9y7dt6Hd5QQrF/C 3PWuw1nLiIQ6bBRy+PMTnElm3wgZgo+CXdjxPXeUhXQmtqachZhN44g70XhPWYU5c6eXsmoCFd i0Y001g+7ZEfu65r0kb6q6XGU5mpK6EgLbyJM8p7qaME552qJWaDM32elJdBV5K8iCGF7xtuPG SNfzx63URsX3X4T6h/rbptyHvd7u7XT1vReVmTRxvattrYGYvkLA1NfiREhNopQ73scexS7UFH rKQ= X-IronPort-AV: E=Sophos;i="5.64,411,1559491200"; d="scan'208";a="222880652" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Aug 2019 14:12:15 +0800 IronPort-SDR: SEILRXt/SrKK9cVWnBLZ5+A6JeNZXHsWF/BPEw4LmzGGuta5NlB+FU/ObDM6m98FE6fxaDPnBY veszYp8Oj5Wp/kkF47lO/Irprx70hOf2umM5ysuHrUOLvrZxh6CEwg6x/undDjXioT7Yh+8ZE9 oiDn0bGyW4Vz5oKuEX7ovQWJVSfdWfMKRw5SZyHhOXq7sESoJ0fruj1IGuNIGe9K/dSNDSdx2h 6Mpp9xMtEt2J0aPwulNpNl0RrSnAjYhUewbzDMHmRWVdIy9AzmvX4Ct+cSgCN7g0Sh8OpXSEpF ASnGsBz/Rfvk/6XVn0sXdggJ Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 23:09:36 -0700 IronPort-SDR: sf7UIrSw9Rwk5i9k5zjrBIF8/J99H8bua9MgofLvz7gP8vI6jev9ZrbFxENI6ilJJrVy2+8phw ZhdwDObYg43YZ8AALd1vaSgZiClBAB1+uprCkj77f+dCa1Cd8PSBaEITkhEV+h+SHRhnmsK3Jn oWeGaexsKRK6qECNtc38lqdOlHPe9QIrKSHcMSc9Rm5EwaxsGdk3Hdle5Ybwp5Mvl9X1BeNZBo VD4fvhALty0ykjJbHvr0pRRIBC297CtsIhNepap0S6t5U1wiKEzFXx+kHx/N/xcLiAvW0bKgHP KU4= WDCIronportException: Internal Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Aug 2019 23:12:15 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH V2 3/3] block: set ioprio for discard, write-zeroes etc Date: Tue, 20 Aug 2019 23:11:56 -0700 Message-Id: <20190821061156.3127-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> References: <20190821061156.3127-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Set the current process's iopriority for discard. Reviewed-by: Martin K. Petersen Signed-off-by: Chaitanya Kulkarni --- block/blk-lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/blk-lib.c b/block/blk-lib.c index 5f2c429d4378..500a857e5d9f 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -64,6 +64,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 +163,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 +236,7 @@ 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 +289,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);