From patchwork Mon May 22 17:19:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Manzanares X-Patchwork-Id: 9741195 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 A2F3B60388 for ; Mon, 22 May 2017 17:23:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87C50286E4 for ; Mon, 22 May 2017 17:23:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CA9A2873C; Mon, 22 May 2017 17:23:28 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 89D76286E4 for ; Mon, 22 May 2017 17:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759324AbdEVRXY (ORCPT ); Mon, 22 May 2017 13:23:24 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:27832 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758051AbdEVRXV (ORCPT ); Mon, 22 May 2017 13:23:21 -0400 X-IronPort-AV: E=Sophos;i="5.38,378,1491235200"; d="scan'208";a="116507013" Received: from mail-by2nam01lp0176.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([216.32.181.176]) by ob1.hgst.iphmx.com with ESMTP; 23 May 2017 01:37:37 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RioXq9fwMEVwA/4Rgw6KLDQ6qrLuLP9UM0lxJrdyebI=; b=GdYve+ZzMJ9+Cca0uHLjIC+Wnmz6NMJ/do0y9ocDRbIX2Cpg+3xKbTmvW0uHug0qZXdqBHi2GtR1FoEpgdJ6l4LfxDa/0xOuvT3zQo7Fx07MBa0KKwMClhBvw8PUeUeZh7qas4lCr0VHcR8jQPa98a0nFGUrTRBki9sdal5rvIs= Received: from DM5PR04CA0038.namprd04.prod.outlook.com (10.171.152.152) by BN6PR04MB0500.namprd04.prod.outlook.com (10.173.201.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Mon, 22 May 2017 17:20:20 +0000 Received: from SN1NAM04FT050.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::205) by DM5PR04CA0038.outlook.office365.com (2603:10b6:3:12b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Mon, 22 May 2017 17:20:19 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.225) smtp.mailfrom=wdc.com; kvack.org; dkim=none (message not signed) header.d=none; kvack.org; dmarc=none action=none header.from=wdc.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by SN1NAM04FT050.mail.protection.outlook.com (10.152.89.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Mon, 22 May 2017 17:20:18 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 04.24.19026.2DD13295; Mon, 22 May 2017 10:20:18 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 22 May 2017 10:20:17 -0700 X-AuditID: 0ac94371-41ba798000004a52-37-59231dd2cce6 Received: from penguito-adamm.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 4F.CF.11415.FCD13295; Mon, 22 May 2017 10:20:17 -0700 (PDT) From: To: , , , CC: , , , , Adam Manzanares Subject: [RFC PATCH] fs: block dev aio request priority support Date: Mon, 22 May 2017 10:19:33 -0700 Message-ID: <1495473573-3343-1-git-send-email-adam.manzanares@wdc.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsXCddJ5ke4lWeVIg0OdkhZd/7awWLyYEmXx 4d8fRosp05oYLTZ/72Cz2LP3JIvF5V1z2CzO/z3O6sDhsWFqE5vHpk+T2D3Wtr9k9vi8Sc5j 05O3TAGsUVw2Kak5mWWpRfp2CVwZR340sBc8l6/o2X2BrYFxnWQXIyeHhICJxPcPvaxdjFwc QgJLmSQWzJjAAuHsYJR4/qiJEabqfOs8qMRWRok/P/exgiTYBOQl2q4fZwKxRQRSJP61TmQC KWIWWMYosXribjaQhLCAvcSKCT3sIDaLgKpEw6nNYHFeATeJZa0d7BAb5CRunutkBmmWEJjE KvGu6z0LRJGgxMmZT8BsZgEJiYMvXjCD2EICKhLzP+xmnMAoMAtJ2SwkZQsYmVYxiuVm5hTn pqcWGJroFSfmpWQWZ+sl5+duYoSEd+EOxte3vQ8xCnAwKvHwajxWihRiTSwrrsw9xCjBwawk wpvHrhwpxJuSWFmVWpQfX1Sak1p8iFGag0VJnDdLdmqEkEB6YklqdmpqQWoRTJaJg1OqgdGa 9cvWdYKe3ks0fFyXLd5/ydJsUcq2OGax5hm1KgpyW8OUp/Bx7cvjna7uUaj4cyObwfJQ/Tl8 /ksP7t+YdFIy2qTpwaKbD6pcfY9Ht2+pqpt5bIcAp/Wkddesjx27bsfXfzb5u3Sk9D22/wvP rzm6gm3L1eyN+a0sO6wDJYJuJAov0Tw50USJpTgj0VCLuag4EQD4xRSTawIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJMWRmVeSWpSXmKPExsXCtZGTTfeirHKkwda9yhYHVtxksuj6t4XF 4sWUKIsP//4wWkyZ1sRosfl7B5vFnr0nWSwu75rDZnH+73FWB06PDVOb2Dw2fZrE7rG2/SWz x+dNch7tB7qZPDY9ecsUwBbFZZOSmpNZllqkb5fAlXHkRwN7wXP5ip7dF9gaGNdJdjFyckgI mEicb53H0sXIxSEksJlRYt/aBiCHg4NNQFai64wuSI2IQILExvXzmEBqmAUWMUo8nvGHCSQh LGAvsWJCDzuIzSKgKtFwajMbiM0r4Cbx4HUzO8QCOYmb5zqZJzByLmBkWMUolpuZU5ybnllg aKhXnJiXklmcrZecn7uJERISkTsYn040P8TIxMEp1cCY3iUZ1/krkz/tcJD27en2VgFNDte9 lq7Z8OPfocwJu3LkFyTtK49e2/FHW99y8dUAt8+pLN+6JJpyDuicfPdsv2e408Nf+6M7rSs9 atoeFlzlL332k99a/3SHLK8Xt6ZG4bI8phNxx0wtV8bU/nnwhoffc22Vr11h2F+PjHlf4t/a 2fcz6CqxFGckGmoxFxUnAgBbAcI6uQEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39860400002)(39410400002)(39840400002)(39400400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(38730400002)(77096006)(356003)(50986999)(8936002)(81166006)(36756003)(966005)(4326008)(2876002)(478600001)(6666003)(106466001)(305945005)(50466002)(2906002)(86152003)(86362001)(189998001)(8676002)(6306002)(48376002)(47776003)(5003940100001)(54906002)(2201001)(85426001)(33646002)(5660300001)(105606002)(72206003)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0500; H:milsmgep14.sandisk.com; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT050; 1:aeLHzlrGs0qJuDPLa7O8/lX95OL3uCM/0qbVlnRuPwoIBNfP1CSqqhhKv76+FqHVz4LqUzYim7kdP0edUPwC4CybsEx631DeF7JuxoPHc0+z6OFPxMOd/aoT+ODiHyN/mXAWLEYaZTJyET9ETd+7WhdgFLV8tQ/zeOEngTnEDh54ZV9cbzEMgJz5WSBPtCqirCF03+r/x+cQIRrVeds/NPygebNvwUKrXnjQiS7TJvL9Z1ZRzrQbe5IJzf3wp1vcjHVADXoENidM0pMArs+H4IE/tnRo9wNxFYSzgZoiDyvZmDaWavyw7qiGWdkPYRxrdFsq2oiLE4fiAhiU158nbIhHlOpNOteYGbcPGSjDfzXKCDF3rF0QOCsP2MDXq1SwJJyQgpCYqDRqkcSVJRp+Qe5sRzF1sbcRxUryWEcUPPp7P0kRw0cOBesUCF4WJW8mR8mU/RaYNhPvDLDhqkOAmblFNNrietbGalFKQfnXT1Rqqg5PvJ1BkKoW95wu+Hne X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdfd2f6f-b079-4c14-93d9-08d4a136d26c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0500; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 3:L9qB/C/rO16kNWsjm6F/yl+Sz2A4CVvCuJIlpbKyEdrdKywqpYKTJq5H0iNIwzdeNCXjN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aK8UPgNxPP7Ype5PLEPhrwFwDZJ8DL2RPjpaW2cSVC1Wpi+bh7cy1ilI3mZrxlSNbyWozj47H/kGjrqWtyiKQpFYZJSksHr8GBMJbTi+G7cK9vryrg+d6wXNh5/776ucjd+YiNKUot8Vz/uDw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 20:8T7kW6jcns8GCQtQxbQDCDdRFLEVx3XGhM4p0VaUY+5IuHJd5Vrw7xl5mUFLxN1X0rKI+PfZL8fj92S4Jf5IdrPGeaz6BloL5L0lZaol1kHpJsfCwmQTSHcuKLg3PZdyz0imVvQZ9sH4ZdYELO5y9Z7IjVJ5O3bfdb8E9yMvEwxhKevDC/lIzY5+ZEvIhA4e2bhkWPmsbgpCgaZIONrnzn2Jz8Q/Sb28OlHaElo8rAZYN3Ragmyz4Ip4VhGI8/RpWsC7pOV3Rj7Mf4BgQxUhUtL3IYOoE2IzKNIvCZ+fuJkfGmiMR3wPzgcRoAxBG3Zjo4q0FEqFzjdrZGH6tlwrtRb0hI8nWQWlR03y2WqSmNw6K2vR/2KT9/P42Ro4QQCEt+76Bp8E6aazBGgh3tV8XAAiP1yQEcg5kKacaJdujcBJP7K/k4idRhX6Ujt7/J2ns4V3JR9srESELbZd+wbOJtbHWGLmq4TmnOfzHLbqnElPhQ4Y/aB1hgWMPTyDFKBM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(20161123555025)(6072148); SRVR:BN6PR04MB0500; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0500; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 4:v3HZh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FZ13KYirg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0500; 7:XeYTTO91vySFThMtFnK7eTg8oHn2qnBXNH4SKm3S1KoaErgB5QDjidlkOTq2Vc/VQ4vOxjM+mEOSqRvK3AQ+4PKjl4kKSGPP5XpgYpzPkor0OqAVtREV88k+dsCmdN4Z1bw+e9HaJ0vu4+L8GYuKZNJTit5MdYXadF5aTjFqXCE5YT16JVFtTwwbTYsjQ2DMufbkTN/f4PMgOaBhzLJhlRlaFbrr+yCX4Wv/AuhOe+8BHThvoV6ZLao0IIgUWc6qsNtPvhgoC8zjKLbW3i8xMOVppSiXSUUdFBzCruuAmLRxUSEwmr6MT/d53otvyddr9nDpROzZYlSCEPY+pMRhBg==; 20:/1bJYnrJ283XYJ3MMps+B7guY2Ib1lsiXFxosXY3dzMR9ZAqr9Gla6KQMMC9beMtN4AT2rxw7HwvroEURiYFL69zCsRqFKFelXIDVrE9H87JWuMT0ZD1DeS8oZGShZ7l9pfkRWw5aoHI1bjE5vBY4uelPnEsyA/CTrQvkK4ZISc= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2017 17:20:18.9688 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR04MB0500 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adam Manzanares Map the aio_reqprio to the bio priority field at the point the bio is created from the aio iocb. The aio_reqprio field of iocb is used as a kernel IO class and priority iff the IOCB_FLAG_IOPRIO flag is set on the iocb. Late last year device IO priority support was introduced to reduce application tail latency when iopriority information was set on the process [1]. This patch mapped iopriority information to block io requests. This information could be leveraged by device drivers to build device specific prioritized commands. The iopriority is set on the iocontext which is a structure associated with a process. There exists a system call to set this iopriority information on a process, but I believe it would be useful to also have a mechanism to set priority on a per io command basis. The aio iocb has a field for the request priority which is currently not used within the kernel. This patch leverages this field to pass a per command iopriority value to devices. This work leverages the work in the previously referenced patch [1]. When the bio is generated from the iocb we copy the iocb iopriority information into the bio, which is eventually turned into a request which also gets a copy of the iopriority information. To demonstrate how to use this feature I modified fio to use the new aio feature. The modification to fio can be found at [2] and the new options are cmndprioclass and cmndprio. [1] https://lkml.org/lkml/2016/12/6/495 [2] https://github.com/nmtadam/fio/tree/cmnd-prio.v2 Signed-off-by: Adam Manzanares --- fs/aio.c | 9 +++++++++ fs/block_dev.c | 1 + include/linux/fs.h | 1 + include/uapi/linux/aio_abi.h | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/fs/aio.c b/fs/aio.c index f52d925..a75a279 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1568,6 +1568,15 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, req->common.ki_pos = iocb->aio_offset; req->common.ki_complete = aio_complete; req->common.ki_flags = iocb_flags(req->common.ki_filp); + if (iocb->aio_flags & IOCB_FLAG_IOPRIO) + /* + * If the IOCB_FLAG_IOPRIO flag of aio_flags is set, + * then the aio_reqprio is interpreted as a I/O + * scheduling class and priority. This is then set + * on the bio that is created from this request, which + * enables the priority to be passed to device drivers. + */ + req->common.ki_ioprio = iocb->aio_reqprio; if (iocb->aio_flags & IOCB_FLAG_RESFD) { /* diff --git a/fs/block_dev.c b/fs/block_dev.c index 2eca00e..20d18db 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -360,6 +360,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) bio->bi_iter.bi_sector = pos >> 9; bio->bi_private = dio; bio->bi_end_io = blkdev_bio_end_io; + bio->bi_ioprio = iocb->ki_ioprio; ret = bio_iov_iter_get_pages(bio, iter); if (unlikely(ret)) { diff --git a/include/linux/fs.h b/include/linux/fs.h index 866c955..83135f0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -276,6 +276,7 @@ struct kiocb { void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); void *private; int ki_flags; + u16 ki_ioprio; /* See linux/ioprio.h */ }; static inline bool is_sync_kiocb(struct kiocb *kiocb) diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index bb2554f..415980d 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h @@ -54,6 +54,12 @@ enum { */ #define IOCB_FLAG_RESFD (1 << 0) +/* + * IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb" + * is interpreted as an I/O scheduling class and priority + */ +#define IOCB_FLAG_IOPRIO (1 << 1) + /* read() from /dev/aio returns these structures. */ struct io_event { __u64 data; /* the data field from the iocb */