Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1886674imm; Tue, 22 May 2018 10:55:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqIvWYnVY13VbmT4KfVXKP4A1hh+To+T9tsfngprDwKMcYqYw/aHJdzCNmG/5Rmn4kqP/Rf X-Received: by 2002:a62:8345:: with SMTP id h66-v6mr25501888pfe.0.1527011709191; Tue, 22 May 2018 10:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527011709; cv=none; d=google.com; s=arc-20160816; b=IIyVyYPPKVLaoZkQiuARAThvQLxYOISvjYugM13ZbmXWegoMs1Qh+ySxDY9q7a7mks vdhlU16ae9eg2ZTPyvHxVFtySqOL8KIi+2cjtQgkV5DmQyyBQP68YN988RyOcGzVNYEU Aq8A5xlpORRU/vkzZkLqFAKIqbVDoZnz75cUhiLR9oKcG8VBnJxw3g1Ouco0EUU52nRc rrSKW8+C2NSUD1OAY5n2M6F0RvGjgqeP24GKwvV453bjJzfB1WXbJ5J8ypwCwTjZVNZ3 7qqKh/PDaUVb9VuNaBglYbgpvf8owD+gfh1TnGgCDhsdCT9E/ScCuO9+QGBF6dAc5VJo BNDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=gD5h09gj3bNgbNc4iCgCSYLgyibTIcgnpjPKQb/gXGY=; b=j10kSIYp/DKJNsoK/2j9JqvG5FvSZQWcNf0fMMB30a8pyNwK074J5m5fllZDrSiSUB S7rl0aA/3Z3OwNQRWuqhg1IOXFynzLkhREKRVk0MlQElFPB1ooUwJERZ88g3qUJD5Nqk /SR0TEn4BMhqvAUJbEC//t5xL8iO3zPZmo64xvB61mXj8waHmwykZd+YyxNP3b/DmsIV FGDU0lhUYgj3njeYWmgx7/6tNmLrFAJ0sBGnicGlIcBcY0J0yMhyC13jeDhdRGyZjmTe I51vpNH5AuwUQNn7o4r3DLh6rxxzp2NkXzz/g0cKAsuz6LHQVE9dMaO495iRRs8vCmrF tWdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=lLlWFXPd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si10839948pgo.144.2018.05.22.10.54.53; Tue, 22 May 2018 10:55:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=lLlWFXPd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121AbeEVRwe (ORCPT + 99 others); Tue, 22 May 2018 13:52:34 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:22290 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeEVRwb (ORCPT ); Tue, 22 May 2018 13:52:31 -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=1527012187; x=1558548187; h=from:to:cc:subject:date:message-id; bh=daQgm1VR9RcxyBgRwgBR2mmIg4tVXrExUeZytpqSWzc=; b=lLlWFXPdjJQfYxtxfYreZQJL+gsPh/6UwhlpGaefz5NJycnjrUKszshe r/gYsj40p4VQlZHXmPYHJEmbFMIFUYRVgsd1GXJTcaOsLKzoBxvGN0wbD M7GUpV1IFBaFgOz7LA4olFFlCdYeZLnKxJ5+CwKlmvWvCQEGo+sXs6IJW 7980mm3VBFKMcpyvD0e6iUwKUHgjZs5iCukkXu7u/BzfzHhh8VIvz5N5z AO97jHg5u7CuhW5K4nqHG0x8XLYPpMkwlVDrUQRQchq7vln/TLePoXxZH 9a5EIwmvkWVQuT90xI1T43vMBAxkqDo8b0rSZAEw0C7NmlqOV4/nTgn8q A==; X-IronPort-AV: E=Sophos;i="5.49,430,1520870400"; d="scan'208";a="175448561" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 23 May 2018 02:03:06 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 22 May 2018 10:42:54 -0700 Received: from penguito-adamm.sdcorp.global.sandisk.com ([10.11.47.13]) by uls-op-cesaip02.wdc.com with ESMTP; 22 May 2018 10:52:31 -0700 From: adam.manzanares@wdc.com To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, bcrl@kvack.org Cc: mingo@kernel.org, tglx@linutronix.de, kstewart@linuxfoundation.org, peterz@infradead.org, pombredanne@nexb.com, gregkh@linuxfoundation.org, bigeasy@linutronix.de, rgoldwyn@suse.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-api@vger.kernel.org, hch@infradread.org, jmoyer@redhat.com, Adam Manzanares Subject: [PATCH v7 0/5] AIO add per-command iopriority Date: Tue, 22 May 2018 10:52:16 -0700 Message-Id: <20180522175221.2391-1-adam.manzanares@wdc.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adam Manzanares This is the per-I/O equivalent of the ioprio_set system call. See the following link for performance implications on a SATA HDD: https://lkml.org/lkml/2016/12/6/495 First patch factors ioprio_check_cap function out of ioprio_set system call to also be used by the aio ioprio interface. Second patch converts kiocb ki_hint field to a u16 to avoid kiocb bloat. Third patch passes ioprio hint from aio iocb to kiocb and initializes kiocb ioprio value appropriately when it is not explicitly set. Fourth patch enables the feature for blkdev. Fifth patch enables the feature for iomap direct IO Note: this work is based on top of linux-vfs/for-next v2: merge patches use IOCB_FLAG_IOPRIO validate intended use with IOCB_IOPRIO add linux-api and linux-block to cc v3: add ioprio_check_cap function convert kiocb ki_hint to u16 use ioprio_check_cap when adding ioprio to kiocb in aio.c v4: handle IOCB_IOPRIO in aio_prep_rw note patch 3 depends on patch 1 in commit msg v5: rename ki_hint_valid -> ki_hint_validate remove ki_hint_validate comment and whitespace remove IOCB_IOPRIO flag initialize kiocb to have no priority v6: add __blkdev_direct_IO_simple ioprio support v7: Tie ki_hint_validate to kiocb ki_hint type Add additional ki_hint_validate check Adam Manzanares (5): block: add ioprio_check_cap function fs: Convert kiocb rw_hint from enum to u16 fs: Add aio iopriority support fs: blkdev set bio prio from kiocb prio fs: iomap dio set bio prio from kiocb prio block/ioprio.c | 22 ++++++++++++++++------ drivers/block/loop.c | 3 +++ fs/aio.c | 18 +++++++++++++++++- fs/block_dev.c | 2 ++ fs/iomap.c | 1 + include/linux/fs.h | 16 ++++++++++++++-- include/linux/ioprio.h | 2 ++ include/uapi/linux/aio_abi.h | 1 + 8 files changed, 56 insertions(+), 9 deletions(-) -- 2.15.1