Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753586AbdDDPZe (ORCPT ); Tue, 4 Apr 2017 11:25:34 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:56811 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbdDDPZb (ORCPT ); Tue, 4 Apr 2017 11:25:31 -0400 X-IronPort-AV: E=Sophos;i="5.36,275,1486396800"; d="scan'208";a="8163151" Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=wdc.com; X-AuditID: 0ac94369-548749800000728b-fe-58e3bae1b472 From: To: , , CC: , , Adam Manzanares Subject: [PATCH] Block SQ/MQ Request Priority Date: Tue, 4 Apr 2017 08:25:14 -0700 Message-ID: <1491319514-6671-1-git-send-email-adam.manzanares@wdc.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKLMWRmVeSWpSXmKPExsXCddJ5ke7DXY8jDG4vMLFYfbefzeL0hEVM FntvaVtc3jWHzYHFY/MKLY/LZ0s9Pm+SC2CO4rJJSc3JLEst0rdL4MronV9TcJynorfrC1MD 4wquLkZODgkBE4l9LbdYuhi5OIQEljJJzP31lR3C2c4oceztISaYqpPNa6GqtjJKnF7fxwKS YBOQl2i7fhysSEQgTGL+9f9gcWaBJInd/xaAxYUFdCUetc1hB7FZBFQk2p4+Aarh4OAVcJPo +VoPMV9O4ua5TmaQ+RICr1kkrvYtYgNJ8AoISpyc+QRqpoTEwRcvmEFsIaA58z/sZpzAKDAL SdksJGULGJlWMYrlZuYU56anFhia6hUn5qVkFmfrJefnbmKEBGbmDsa7T7wPMQpwMCrx8FZM exwhxJpYVlyZe4hRgoNZSYRXaD1QiDclsbIqtSg/vqg0J7X4EKM0B4uSOO85makRQgLpiSWp 2ampBalFMFkmDk6pBkaRtLztcU4nWZ8v7AgxsN70Uku9xWGO3g2P/BvHtE+kNIt9LjGqU07w d9ndMTXC20V0SlWV15zeYM7I52fNdoTzC+2Wk61ICVs62Ub9znF2qzVpT3W1/nGJK03tttc9 urmvy+ljQKWj7afu85qRExbNnF0SWWnNvik1gWdPsjtDlOKMdfvrlFiKMxINtZiLihMB96K5 7kgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkuLIzCtJLcpLzFFi42Lh2sjJpvtg1+MIg/4mFosDK24yWay+289m cfBnG6PF6QmLmCz23tK2uLxrDpsDm8fmFVoel8+Wekxbc57J4/MmOY/2A91MAaxRXDYpqTmZ ZalF+nYJXBm982sKjvNU9HZ9YWpgXMHVxcjJISFgInGyeS1LFyMXh5DAZkaJSWdusXcxcnCw CchKdJ3RBTFFBIIk3rbkgpQzCyRIzLv3gRHEFhbQlXjUNocdxGYRUJVY3NcFFucVcJOY0PyY EWK8nMTNc53MExg5FzAyrGIUy83MKc5NzywwNNQrTsxLySzO1kvOz93ECPFw5A7GpxPNDzEy cXBKNTBOC3sabRR79eQty11p149fPSn17FzHTMvPFklXj0+VOHx0+ezGImnj7OR+mUMXzq5r M96WkV+xNrNMLu3Ho4glJgXf9877tq6D48bCbouW/+K5wnsypjdrF/0IvPS9aknF9GX6Lzmm XL8uveHxS/frZ8MXOS5dxWCwUHHevGksE87P0zqgp6rqpsRSnJFoqMVcVJwIANGmXb2gAQAA MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(39400400002)(39410400002)(39450400003)(39840400002)(39850400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(305945005)(86362001)(8676002)(77096006)(50986999)(106466001)(85426001)(105606002)(2876002)(356003)(50226002)(4326008)(8936002)(2906002)(81166006)(2201001)(38730400002)(48376002)(50466002)(36756003)(5003940100001)(5660300001)(6666003)(53936002)(54906002)(189998001)(86152003)(33646002)(47776003);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR04MB390;H:milsmgep15.sandisk.com;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3NAM04FT010;1:r2XaqjOlVymdRTYn1VydsFESk7ukXg+yhy8TgSaZG64cnfDHIA1hgB0P7ek6ht4wDCYdSdf4uuBjtoF+wKcbu1/Lw3srhq9MViFA9XCd2+GFpd96oBUOwZEmc7T6SPsBjG5zwy7eFA46PmJP1lbwllFapOLAG9dIxu5HNvbdr+DX7y3ekcUMd3qdsgxbrmB7NO9fyFTDFLRMvWnECoxWYC9QRDkDCMelhGAr6ru2pquE+lsG5zzN0Xwv3qcrCVMGA98zZyg2tM9Lku/Uar+tY8b/6QqiM4JIZZ4dnxDvN0M2DM2N0mBZFUUmc1YGDbO4xAByN6Evbw3AIT6TDZOtkZ2fVQZoezJl66kxDEBJgqoSrYavCIjGw4Te1wLaxYzswqstCQSa36Y5FVdI4Qr7CVYR7b+LSiT81vN5+WLzN8paymV+0ub1XqVCtcV4HuwQh+BmplZnJ6EScySHxQwYpeRXqYFg3g3eCZPN/X0wHNJtIf/aaGpb3vcElife4L3ZsSpi5wM+rvkoQSm6lkIUfSuVSvWD97eMMuEkVyOqd98= X-MS-Office365-Filtering-Correlation-Id: b55bf85c-46af-4b1b-d873-08d47b6ed209 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:BN1PR04MB390; X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB390;3:L7kg2ZcbdAI/WPs9CGS7mgCabI/vJbv6sywv0eAb7yaHt3CkY9Y9C3P/6Zu2i9vBUpNySqBkuRVh5zwZ8iuO+IUnxhhCLG3Xymd+uANJ+H7Kajp2gNI8bxCcHLqRomqmCz09hy1yBOR5PJV0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t3bbJ2DOcHlOZQaHGrML7y3MYPxNAWlrua5+/dvUf1kS0LLl8=;20:/htlhjnLRRGgYTpCYT7HHlqFwJdh6Vtwqj6F1d5f4xbfX2KiiSCsKRrUKo4Yw/CBBqBB90yWb6VTyJNQWLRv50XgXAqPewCk7r9rokdAdL0e5d2FCAemm04l4+2+NsAevJN776aJZribdY7hJG1z2See2eNEfLpehg4OZWQElKhA7WPfSTSreVIPlKdi+IpH3gE6gvKUvxJI/VFcf8oyAuL1gU5kZgY3UW6Pt6Pdc3X+U7FVpeWUqFA1f+I4D1ThjmZEQoZ2sCjCeI3XaH9BMKIN059OrKSgj4H2deEKgGIXgYTN43psw8DCD9nkrzX2picttMBd0Fnu7ZD+4arZIaAGRiYlTtyJ/w2zO6M6ApJeIITb2PLLBLyAsjzB+JclEo+xDnZNG4+mCyE2OZVSBuHh7yP/TvLJ7FrVf47CE3zRT7i+gjNy3ehG0gm8rB4z76VgZMXZ/KOihdzVuCRnAACMfx4oW5IPM++0kOYiLQ2Qy8Q+lC03Styqq6Lo/3CW WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148);SRVR:BN1PR04MB390;BCL:0;PCL:0;RULEID:;SRVR:BN1PR04MB390; X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB390;4:5W+SEDegp8SHxgrgcfF0HeuY59WHC45iY9dQbZRpqRgQbtIN1ALkVcx68gBM3HEqp20Bs4E08kjAxPzG2pmxP6I9VDn3V84/vlzat2hrmK22Xec1AR2kJ3d76gcEG3CDYidNUPUZHni3003UNA/5SDJi7dlMMBUjxNNWOQ+MfLdoxICbhjk6riipb9GnuX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us-ascii?Q?MeuNPD/GnquKxad8OFTlApxM81769jepD6jCHmOug1ecZJbOWTGZ7tXUTdZ1?= =?us-ascii?Q?gOZI2Wc0eZpi24gvd4/UOk+RFXmXGaTcGydUk+dALpInlNFPDk9rt9fnECvA?= =?us-ascii?Q?KiGHTmQskiSAKkewuEdsdcUSDTwpBECvfHUPiN+49pfcxespmviKotzb+cBK?= =?us-ascii?Q?9GkvikjRTp4V7WDJmFsMjhaLbpQv2mg8HHvv5wHPcxzDtR4NfGKL6yG5awlK?= =?us-ascii?Q?peREVunT+xzTWk5getv8EAmVJwzyrFq2wSIxgvkPWp0WkLx991Bf84VkfK57?= =?us-ascii?Q?9VKczC9zVLj2AZv4C+YS6Wwn/P6FegMnQGR23ltu42wxDGD5r646w3gpHsTJ?= =?us-ascii?Q?WMxMcpt9d97qPte3SWChq62oYEna/DLlrl+xmYVET42z4+rIFoyQRCjw4Ad4?= =?us-ascii?Q?egcrgPeko2sK/bW3yq2AvFk/HLG+E75zQ8HGC5gssoCv5vdKu+Vwm8UvyXCg?= =?us-ascii?Q?ncRm+wTVfHphyTfvFTATUuBK+ebJToZRzzFQT1z67xJI85b+GHpEikc9IauD?= =?us-ascii?Q?WyMasGsjm/dyRV+9OVkyTdz99Fa6Ai+M6Ncvv2xuMnEKUjk+aG0rF1kuECZU?= =?us-ascii?Q?lUydwTKSxIwokwGCvqMC1zePzBxOyo5ge9264TesCSTWPL+iagliWbYzQxXH?= =?us-ascii?Q?FFC5yIwEx4DzxgDBMrqVTH9FF5aTLhUmCp5kqqCfSnlZu/I2jfmYBSrUZuX0?= =?us-ascii?Q?u9A0QYXLgjkt5mgtG8WwA2OGyz?= X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB390;6:qLdZ1mVSTb4qWb8dkzoR/2fXHZ0y31WO3eTl5xcvNGk/JKuuYn2vrLIm+Z8wGH4KpWIY5uFAgcjEmL15aya2fE0kpS3WMJ6VtUTBH87YpivOeb2t/6BiZSzThKIHXNC6aNruoR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/p6GhofeMx9de/R623ZS+DNThKFiHTWNrq6SMZ5VyTRkNDxw1rPg+uqcNPvVk4InUbMZtLMx0= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2017 15:25:25.2599 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86;Ip=[63.163.107.21];Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB390 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 48 From: Adam Manzanares In 4.10 I introduced a patch that associates the ioc priority with each request in the block layer. This work was done in the single queue block layer code. This patch unifies ioc priority to request mapping across the single/multi queue block layers. I have tested this patch with the null block device driver with the following parameters. null_blk queue_mode=2 irqmode=0 use_per_node_hctx=1 nr_devices=1 I have not seen a performance regression with this patch and I would appreciate any feedback or additional testing. I have also verified that io priorities are passed to the device when using the SQ and MQ path to a SATA HDD that supports io priorities. Thanks. Reviewed-by: Christoph Hellwig Signed-off-by: Adam Manzanares --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 43b7d06..316a539 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1149,7 +1149,6 @@ static struct request *__get_request(struct request_list *rl, unsigned int op, blk_rq_init(q, rq); blk_rq_set_rl(rq, rl); - blk_rq_set_prio(rq, ioc); rq->cmd_flags = op; rq->rq_flags = rq_flags; @@ -1636,6 +1635,7 @@ void init_request_from_bio(struct request *req, struct bio *bio) req->errors = 0; req->__sector = bio->bi_iter.bi_sector; + blk_rq_set_prio(req, rq_ioc(bio)); if (ioprio_valid(bio_prio(bio))) req->ioprio = bio_prio(bio); blk_rq_bio_prep(req->q, req, bio); -- 2.7.4