From patchwork Tue Sep 27 18:14:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Manzanares X-Patchwork-Id: 9352555 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 2238360757 for ; Tue, 27 Sep 2016 18:15:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15B5C287F3 for ; Tue, 27 Sep 2016 18:15:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 069B229193; Tue, 27 Sep 2016 18:15:24 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 01328287F3 for ; Tue, 27 Sep 2016 18:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755586AbcI0SPV (ORCPT ); Tue, 27 Sep 2016 14:15:21 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:50489 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953AbcI0SPT (ORCPT ); Tue, 27 Sep 2016 14:15:19 -0400 X-IronPort-AV: E=Sophos;i="5.30,406,1470672000"; d="scan'208";a="21729110" Received: from mail-cys01nam02lp0048.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.48]) by ob1.hgst.iphmx.com with ESMTP; 28 Sep 2016 02:15:19 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-hgst-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/iLMG5SYHdMqfTedx4bhmzJy1xxL2WPFVHy11Rm0HIg=; b=g1ld8lwoNoBY2BnszYrFbLKGugGGRDp0AeWBrDBINUzF2xwFMMGUq0Wa9uQwLKmkx0nniWAKn0PfUCM+GrahVxoMoi8DsUpStAVZAcQWpoLlz/z/aKqTpOGeUPdYDDAh1DdLahaBEQayuQtjXp8NO4y0Vg4Og7m4ezxzUXtqgkU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Adam.Manzanares@hgst.com; Received: from penguito.sanjose.hgst.com (199.255.44.175) by BLUPR0401MB1714.namprd04.prod.outlook.com (10.162.215.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Tue, 27 Sep 2016 18:15:16 +0000 From: Adam Manzanares To: , CC: , , Adam Manzanares Subject: [PATCH 1/3] block: Add iocontext priority to request Date: Tue, 27 Sep 2016 11:14:54 -0700 Message-ID: <1475000096-6148-2-git-send-email-adam.manzanares@hgst.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475000096-6148-1-git-send-email-adam.manzanares@hgst.com> References: <1475000096-6148-1-git-send-email-adam.manzanares@hgst.com> MIME-Version: 1.0 X-Originating-IP: [199.255.44.175] X-ClientProxiedBy: SN1PR0701CA0045.namprd07.prod.outlook.com (10.163.126.13) To BLUPR0401MB1714.namprd04.prod.outlook.com (10.162.215.16) X-MS-Office365-Filtering-Correlation-Id: a8152c86-92ab-4e29-4257-08d3e7023baa X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1714; 2:nRmHwDSwyTe+28LYn3zbu7Mxin7bjg+pFUaVQTal2E25gnVZbmHepLwZTS4l5b9S2LaE9txd5dZKeJilMsiFLQCnGrI2aPvrmgO59aVJx5KXzCIvFHI/KDQ/eZXt7Uqj0PuWGBt+g71YokE79u1d6x+T3lRGmLpk13ZodwaAU2CySqHb5OvdlGeDq41wvqs8; 3:utcH/kq1S/+VUtJdtufhRs1IOqx+/U8RnLLVhCY8mkYfVryEkEb+U20OsNq+9Ybr0JHs/qweiB+hzNW0ZINrSNjCWaZbgc8Q0C3x6CB3bTW/L2Wh/oCdqqASlDYt81rx X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0401MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1714; 25:jLstPSxVSg7Z8U1SI62xi4fKVPm+Esy0rlW/QyDH3n2204WfgK3bd5fKNpKQ1EUTtT3GS0AaD5vvSnGgU4CR4Rk6FsccbeODFhwb+C5vworna7USk7yM0lHUV/9pipEOkXlVxKjX8W/Er3yyrO7Xr4TtIus40F/JC24kXN/DsIx7c7fMjOxgug64uw/hLkIMqPCqLyQHuE7d+YJ0LAe8p9fSynym+PehPFqJX0HY+M2iH3w+XZ4A8aE/UK/KNgaHyT/VS1AgJjIuNYfL/d8A1c0858RlfdLTGN6qkwn6QH2HCU+3BoWHIRJI4hM++VbJB9waheQpdAwcxPQENugb+7p2BzplAU9WnPBB6zbAWotV8esgA1bG8bbNg1HwqX80bcneUPQGM5YOWccL9CJGxl2DgNVHQWt78VXTE5BkSjbhO99bO7G09NC8XQPKuU4xa/9eTC069SvhyLoVxx1WHEKr9bhGFmPerO3pe4nG0mfKnT3kBMVmOWTroh0oPhuTjoUngnLlczM0ylgYuf7zyzlxDwWA7EzCxoBGqJP0J0qc+kuTVy8MG8eVzwDNdLGW3h9iy7af/ajNohEQSzySvvkNj9Ri1iziCPtsldwnOXuzj1TVcGu0E9qfSNKypZZsZ9jief9VQEbkFRkjUE3QNEQ8Zrvi26xBlrF1wDvSoDd0CP5CqNOKaif6HAI6MoxwloBUgzcG2/W70JHrFvguzlNPAaTdMCtlci3QSxmovI0= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1714; 31:zd4znHY2daFPLzzQf7b3hi8At9V8aAY1wZ0SLMsDaR1rJ2G84kYVJL13kXbV0jHG1yYqAzqc4hFXn94uTqH1QhKdhQZ30x+CKYUBny559J/RSGtfsAtzzP/gNYV1YwhSeCO1GGUhNEQUzVuyc36xfz8FHEdZT5dsP9G5gTU54MrSM2gnQR6mDJsFvVclP146spuEBb4EC9QswwMENlOC//MAZH6yv4sOD911ZAzeaf0=; 20:29RMplhJRiNNQEvc4aqnaOh8VuXzV9zpL4uxhm1NHpCiz/uVipAfITorLvIVu5H4J1RbsHh/2C7KaVmPVXdptOuzZ3fFcWgigTt1Fy3npEXn2ZIFhDR1lZoKt/gBcU6fpQSV+AR+SFuMWDCGXPqH2PP5n0O7x4LT9lAJXPZsF542ZxILoPjLz+WEfJpuQvGU1nOKyYaczW4gtwWBGuSKzwAx9CVR/FiHkkt1VcAmHZpT4d6PQJ/SIOFzcfY1Tox+wL9KjPBigVpcnN3G2zVz1o3vU3HlGED0Em1eK/5f70QGyhcFWOhZsw0NkFs4G7hWLwoGN+ee35c1EYNWUmXQc2l6e5sA5lpZ57vzZhbmMN2fxajlT6SQNHB0p0Lr+EGxnDGljL5vhRjxVeiTzjIuVJ4i9Nlch4uSHEzU+PXBS5FOGqdLt1mpwOQjElLGENq6dst37/aVbsBWecTX9Z5N4Yib5C+wpLdE4zFzCpCm1zt7KupnXs1D8t0BaaKH8S6c X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(79135771888625); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BLUPR0401MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0401MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1714; 4:MYGqbrW0WoHbepTcntNNEhp6lbZ0srd7XqzIzC4YpDw9APvijxj/Ho6yWpVVcyRmcdZg+8XGhuwfXsQrBjHmn1usPgRo0cetGOAjN36sJxa1GSctkHYrIypD5EsJtLp/dzpK9RdaRZ1mymmMa2/YAIYcKjU53V6C8yaDW6X+IVNty3bWrkUIvdcdbIlmIpWrWNWpm+pQETLt9xHMcctsQ4huoUJqVyoqjQQl7EzXjqAMcmSBTXXnqFE8Hx40wJ0KgXWnWfnB6DPoo7dSwxJIJs74b57l96DQc7UWKA7ki8O3kA5+0asFUsKK+eMwTg0964btNUt0kjtr98DTCmOy2p+XQS/y9yJ8rCguf4/ODbFesKSCuiBZYvi6Zm1CD1RP6mH+GJPR1YrSQYDxfLiWmkMhS1lrXtlxoJr+9owaug/7fjVPEo/87sckMNujDETT/sqioXPB+ZCyc08BAMFT0w== X-Forefront-PRVS: 007814487B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(5001770100001)(97736004)(107886002)(5003940100001)(47776003)(101416001)(66066001)(48376002)(50466002)(77096005)(86362001)(3846002)(6116002)(19580405001)(19580395003)(189998001)(5660300001)(586003)(8676002)(33646002)(4001430100002)(42186005)(105586002)(229853001)(106356001)(81156014)(2906002)(81166006)(2950100002)(92566002)(50226002)(7846002)(50986999)(76176999)(68736007)(7736002)(305945005)(4326007)(36756003)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0401MB1714; H:penguito.sanjose.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: hgst.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0401MB1714; 23:IlNWdMovZxLZKdKEyS6NNOBsbJWMfPvtgOwV2lc?= =?us-ascii?Q?LGR8zvR6O327VVV5f63fCjptsW59LhKRTFz800IJ7ERCNkD1x5eyLVfTebu0?= =?us-ascii?Q?AzJ4K5HR2aMmzN7ldbX0v8AraeF/iaI14OIb2Rgt4Tf4eKoVr5PRhiVQOj7c?= =?us-ascii?Q?D4PFCebcr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utput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1714; 20:5i/siQU58fg6GC/wJz7xauVcIvEHQcEVyajW8JRDgtBBe2SMkSMqTpsVYCygnI6iIEulSUgVfo1virpmDI9rUGec7bOg7IgoRzMYUEWkKkqFqQKcsJW98we3JR0Rk95NC3HH4PHAiKNPrGSVHHIAUsNegEb2BeeZhQ1dVCg+636/p6jhjshMWww63krba+jomuIigJdqubAOdXv8rhbBNefkj2D7cltDdC+soCUbymgfLKgVlq3yI+/mASQdRinu X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2016 18:15:16.1182 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0401MB1714 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 Patch adds association between iocontext and a request. Signed-off-by: Adam Manzanares --- block/blk-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 36c7ac3..9c6d733 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -33,6 +33,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include @@ -1648,6 +1649,7 @@ out: void init_request_from_bio(struct request *req, struct bio *bio) { + struct io_context *ioc = rq_ioc(bio); req->cmd_type = REQ_TYPE_FS; req->cmd_flags |= bio->bi_opf & REQ_COMMON_MASK; @@ -1657,6 +1659,9 @@ void init_request_from_bio(struct request *req, struct bio *bio) req->errors = 0; req->__sector = bio->bi_iter.bi_sector; req->ioprio = bio_prio(bio); + if (ioc) + req->ioprio = ioprio_best(req->ioprio, ioc->ioprio); + blk_rq_bio_prep(req->q, req, bio); }