Message ID | 20170418231037.3968-6-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> 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 09D24601C2 for <patchwork-linux-block@patchwork.kernel.org>; Tue, 18 Apr 2017 23:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF6D427D4D for <patchwork-linux-block@patchwork.kernel.org>; Tue, 18 Apr 2017 23:10:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E30432839C; Tue, 18 Apr 2017 23:10:59 +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 74ACF27D4D for <patchwork-linux-block@patchwork.kernel.org>; Tue, 18 Apr 2017 23:10:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757891AbdDRXK6 (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Tue, 18 Apr 2017 19:10:58 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:19826 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932565AbdDRXKx (ORCPT <rfc822;linux-block@vger.kernel.org>); Tue, 18 Apr 2017 19:10:53 -0400 X-IronPort-AV: E=Sophos;i="5.37,219,1488816000"; d="scan'208";a="12095418" Received: from mail-dm3nam03lp0023.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.23]) by ob1.hgst.iphmx.com with ESMTP; 19 Apr 2017 07:10:50 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xPfcpwGX3b6smx+3lADSvGSyFR503VIpeP7ZBz1jcj8=; b=R6F9Occx7OQNB+69T9GMpiTwoHkjdduHESovGXUFnL3Izx67w7jY58whwIJ5ykTOu/ZIgN+4smrXqR0+MLGKqMXpN9C8TWbXGC06jTi9hlFlW+xKfSI4T56r8ybKiT04JDP5/NXODNV/upA8N9NORZTgrGdz9O+og+RGTrgTDR4= Received: from CY4PR04CA0025.namprd04.prod.outlook.com (10.172.133.11) by BLUPR04MB837.namprd04.prod.outlook.com (10.255.188.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 18 Apr 2017 23:10:48 +0000 Received: from SN1NAM04FT026.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::205) by CY4PR04CA0025.outlook.office365.com (2603:10b6:903:c6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Tue, 18 Apr 2017 23:10:47 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by SN1NAM04FT026.mail.protection.outlook.com (10.152.88.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Tue, 18 Apr 2017 23:10:46 +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 7E.E2.29323.3FC96F85; Tue, 18 Apr 2017 16:10:44 -0700 (PDT) Received: from milsmgip12.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; Tue, 18 Apr 2017 16:10:41 -0700 X-AuditID: 0ac94369-548749800000728b-2a-58f69cf37a43 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 3B.14.18148.1FC96F85; Tue, 18 Apr 2017 16:10:41 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Jens Axboe <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, Bart Van Assche <bart.vanassche@sandisk.com>, Christoph Hellwig <hch@lst.de>, =?UTF-8?q?Matias=20Bj=C3=B8rling?= <m@bjorling.me> Subject: [PATCH 5/5] block: Optimize ioprio_best() Date: Tue, 18 Apr 2017 16:10:37 -0700 Message-ID: <20170418231037.3968-6-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170418231037.3968-1-bart.vanassche@sandisk.com> References: <20170418231037.3968-1-bart.vanassche@sandisk.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDLMWRmVeSWpSXmKPExsXCddJ5ke6XOd8iDHbfZbNYfbefzWLl6qNM FntvaVs8/x3jwOLRcayb0ePy2VKP3Tcb2Dw+b5ILYInisklJzcksSy3St0vgypizaS9jwR6u ivUNbSwNjA85uhg5OSQETCTWNp5n7GLk4hASWMokcXH2czYIZwejx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1esin7W2G67HP++4+smLqdd2S9 /iTstsfjVuGrwpCO3eYt13PYow6lvDiY2FTVsItL2mpmy+G3f22eHl+3MCj2tMALeYetkQ8F d7m0m8gtmh82/aR+t3ul//VbHpkZkk/ZXy8SdfdQYinOSDTUYi4qTgQAEz909vsBAAA= 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)(39860400002)(39410400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(1076002)(106466001)(5820100001)(356003)(76176999)(4326008)(8676002)(189998001)(50226002)(8936002)(86362001)(81166006)(50466002)(5660300001)(2870700001)(110136004)(23676002)(38730400002)(50986999)(6666003)(6916009)(2950100002)(2906002)(305945005)(36756003)(33646002)(54906002)(53936002)(47776003)(77096006); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB837; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT026; 1:8fosn/hXUCLBNJO+ymNxOTNjY8bmnpPgNSbtU8fnIKL+n83fVeyuSLFNgzE/HWmz7FY6veM9rlfEg9+W6RNMTt2NK2GbgPGQ65XskfqdRqSCWgG2AMvBMfRTrj9RKQVhwdEePIu+PBfPV5ohOPNv3LWqkO6RBtOOFDZ6P4cM7osRWEYgbbbfJ8gVz+Xj4YKlwC8EXNv3aWdfhDCbO/r6CDaAldJQZLJmwYIEQDUwGfYNwCOFC4RuM8/P02HDkGhkRAujz4iIWH6tPKGmyB9rPW99F2H4vWGEhyM4CRQokj2kmvPhP7KhLEvFsDwLLytb4v49VIwpPP9DjNCHD8S28jcw7fJgm8cy+uAxil70EgzPFnCShqPeuK6OqnTygO/L+Hm976kC9s6f8SkbhYtFqL2uXcJylU9y1hPX5UvHQwDaRFwDQ5ioAR1oisLBlVncuE4G4YgXCqeH2Rj+V4a1+GDIHJYaoyORRWfDiDoK3vFr0h1HqGQZcUbSAXByelTu3Lr7iMGBJQtQJ2x7Bk/3pKA1pVYyhTk1myxskVEnbGQ= X-MS-Office365-Filtering-Correlation-Id: 834090fd-a6b2-49ad-e720-08d486b025c5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR04MB837; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 3:nD8ReF6inthB+qsPoy3HhzaFvthzOCGvOp+7SPyvk9aRpvDqhkCCDc0DTzPBy6h3bLNM0mIgCflQMak26coFTYl7ZnZTd/c6VWFpbaXJkS/f9K6ARt+P6kX2ag4PS9/27yyPy6c814v5MYTRfhMvgz7V0YZyrqM7WfZWghisrfEa+Jgh0YeODgnsbJqfpob9yxMQj28dEWkHqGNJH/XsYew3KTe2PcJNE6/zySm2lSfHeG8ombKHXJcxslPcsqK3L6726Iu9h3+e9p8w8iFt+v3SxcuwdBmIMTbWGfg5Vo9Gy4C74H/CWHhBXM48qhFyFd7ZRW5p/gDuFTryuIQCIDftI0/ROyHZne2PqAOZ2W85HlxxRc5j0TVz7GZH1mCjysE+kjMndPNdsnubFmki+pNMNzTw0BQlhFudlsl39wl9wSCP7/uO2Mo4+YGtUGDuHkNnDu+Ig6xgdqMQaWNWBBwvKxgP/ryXZiszpgwXrlozBMa8pxfXMNqqH3xtOTRdLtPh0HbNPpvDQD/Hl/mU7Q== X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 25:6jesClraSRZ7tKzPDLGID84+iD1Hnq2MPjknI0o3YoDPA7D+4MnZK5zrnKwa5sAm3qiQFY+lOvxgfMvZYpHoDBzBzOxTqdGWuHDa6YTsBQTG07tSQUcmbPHDLRFFJiZXTiQn4WUb4NrbrjMa8Dt1GH4L6IZvYBvKV5HQ7/9jj+9T8KE8r0wv9YBZ/MzA/mLXm7nxZh+chYWC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mPn7+A9oJpZqRlb+sS+utRrwfe7oFwHvduaNLYXDGDg4T+MEKl8dGRKbEbzSwR X-Microsoft-Antispam-PRVS: <BLUPR04MB837EBBAE0AA632C115A0BBA81190@BLUPR04MB837.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BLUPR04MB837; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB837; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB837; 4:ojjHp3y6tXUDUkhNXH+KCvYWD018Y2RRAymjG3CvfSy3g/stTmEpZewVr5cZ7nVGNwxwEOGdbf7wuFgTcKcjmDByJFipSKAF3HGaEZLysD6Gisj+yXBq5DMOjngfR7GW/oRD7Swr+3ZYF9z0+gBapyKx+PxF91BRG5eojO1wjHFyweS4NJ2KKy7WGApq4O3axHv3Qn/fmARDcYSYYByfOJoeFiYDREbJXtt0MaqQraWat4RQFWF9Gg33qFYW1DDVZL3M5H2m6vUiqwynX6aNKUkYCGAyWezeeYemsbs1iRBKSzlo3cZ1mZgF//wE0b/yOJPlqFS6sROCE4vl+Azqdvr5ilc1uOy6tG9brMs4pEaIeavap+FiaO+y41GqTkiGEyrVmgqKFloAHcj3SKf1xXobO/ncvmFTq1VL8GgUtPZn1DqHQ4XRnKKNgizxzWAoKqnKbWUbyWruXvPI83Rv57jVOehJsrAPBElnE97vIXnb+d9NIW5zFPf6UccYWaHTrB3l4rbUMP7CnmQXys/UVdKQJMVrbyPyX9BZWcGf5QzTPYL9pbHQVGdupuNnqXoICxJ3VLU4gZVIVdEWvre1/DcIXKl/X/VsMd7hqCl/DlUQhf6QKc26kNhHjowbRyitIWLVLfFl7ANtZKfk2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D/dNxxe9l4CAhwTCv2IGyYLieskbPpYIDxl28bxhpVu7IoFNoYwKEvmP1/LQtbT6StTUIWo= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 23:10:46.8269 (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: BLUPR04MB837 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On Tue, Apr 18, 2017 at 04:10:37PM -0700, Bart Van Assche wrote: > Since ioprio_best() translates IOPRIO_CLASS_NONE into IOPRIO_CLASS_BE > and since lower numerical priority values represent a higher priority > a simple numerical comparison is sufficient. Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/block/ioprio.c b/block/ioprio.c index 0c47a00f92a8..4b120c9cf7e8 100644 --- a/block/ioprio.c +++ b/block/ioprio.c @@ -163,22 +163,12 @@ static int get_task_ioprio(struct task_struct *p) int ioprio_best(unsigned short aprio, unsigned short bprio) { - unsigned short aclass; - unsigned short bclass; - if (!ioprio_valid(aprio)) aprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); if (!ioprio_valid(bprio)) bprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); - aclass = IOPRIO_PRIO_CLASS(aprio); - bclass = IOPRIO_PRIO_CLASS(bprio); - if (aclass == bclass) - return min(aprio, bprio); - if (aclass > bclass) - return bprio; - else - return aprio; + return min(aprio, bprio); } SYSCALL_DEFINE2(ioprio_get, int, which, int, who)