Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp479292imm; Mon, 21 May 2018 09:04:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp3X4uHqU92wSeDUSoFybOfv4EwKbNW2RVyzISeBQMKSclUwOp8HQw3cNz/hkbbww1CeOdV X-Received: by 2002:a62:1152:: with SMTP id z79-v6mr20437980pfi.135.1526918652393; Mon, 21 May 2018 09:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526918652; cv=none; d=google.com; s=arc-20160816; b=AvIWBgmUGix9iAgQJrxbLF0VNRPL3ydb5752dllgvkKproCjyWyDpxV+xI+jGfIOi8 8jFKzFridhXHdNw71SCJgcCKELJBn0AbwJH3I64NaOoshaX4HUB514UQUvHOuBy2phKo gVn2w0Que4nTWZARKHUzRyurEDuGvLJvLg7T5HBOWwzjawGVoXRpyVliyeJo1Iqa+Y9v Tn6d4w15znFoOz7ynmgKowDzV2l37yccEFVTxByalNPAZltGA7hBRPbz1QSgAc9T2FmB Y8+AS8g4QFU2IVIHiJXN+04FnCpJYhEyNESAijwwuMq0pExSwAOvGtEdDiKrr5GvYGaw seUA== 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=BsABptD1CylETlAOOX+pGfDMSEE9bttgW1MZcpPm3ok=; b=LSj5kiBqsxyHbdru6JwgfufYLe8h0+rQP6RYWe7W8W/mIe3T7tIIjIHOEv2ZxRLP7q tH+5ldT6G0Q5xfDD28Go8hgCnltJ2zIu2VAbkpPt4MWf4hN+xQEBc3G0KhlQJoRWafy5 SoO9G2HG0tCk64IaGbufHRU3e9GQwOsTTiiDiiGzprutE4Kos6rxeHxorj0XKzk0E+9E lzSZatCE5V3F2ORJ+dIrWnKqsiNuZ/jlg+HbIsDK7sgbrR7NfkhWqQOkhADhPBka0ECA TW2oRDZIaUhCavtIvpU+ww4e1K+d/9dVQIq9qup17m44bpP30NFp8s110lKsJwwsuRPp nOEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZYzcEBCM; 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 k185-v6si14154566pfc.361.2018.05.21.09.03.57; Mon, 21 May 2018 09:04:12 -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=ZYzcEBCM; 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 S1752862AbeEUQCa (ORCPT + 99 others); Mon, 21 May 2018 12:02:30 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:59151 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbeEUQC2 (ORCPT ); Mon, 21 May 2018 12:02:28 -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=1526918548; x=1558454548; h=from:to:cc:subject:date:message-id; bh=cVMv6AF7JvoJ8FMGKDNvj3Hbpn5tv1/kvhQRGdPZZ5Q=; b=ZYzcEBCMyfxYAZ6o9ZYdkeOlSfFH6vENBZeYjItieg3yoxHxDkbKB4N0 /mLqo/Th6eIBEnhBDrYOgRADKsJSILFjFzkK0+Lb+oamfz3U4Olc/bEvJ 9Eyvzka85x6pNFMYieQgS6NX+muYP3Nyia+IgFQHwlV2tLreSOST3tUan SwW0piaP6tDx7cakzoIOZa40MDdr9sd0JCd4ldbT11s6vC5vSbnRXUBJg 9SI5vBWXLYvElSeUAjklyrzIWbYrE0G8remf1hsoYTKfddUl93wNuo4+d b3+KD1UAT2QVV9Xw0LR5LmwFVqBlBkZ7ViwsaG2CtEh8vqgNVh+fU2uD+ g==; X-IronPort-AV: E=Sophos;i="5.49,426,1520870400"; d="scan'208";a="79445377" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 22 May 2018 00:02:28 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 21 May 2018 08:53:25 -0700 Received: from penguito-adamm.sdcorp.global.sandisk.com ([10.11.47.13]) by uls-op-cesaip02.wdc.com with ESMTP; 21 May 2018 09:02:28 -0700 From: adam.manzanares@wdc.com To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, bcrl@kvack.org Cc: tglx@linutronix.de, mingo@kernel.org, pombredanne@nexb.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, bigeasy@linutronix.de, jack@suse.cz, darrick.wong@oracle.com, 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, Adam Manzanares Subject: [PATCH v5 0/5] AIO add per-command iopriority Date: Mon, 21 May 2018 09:01:42 -0700 Message-Id: <20180521160147.2372-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 inititalizes 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 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 | 16 ++++++++++++++++ fs/block_dev.c | 1 + fs/iomap.c | 1 + include/linux/fs.h | 16 ++++++++++++++-- include/linux/ioprio.h | 2 ++ include/uapi/linux/aio_abi.h | 1 + 8 files changed, 54 insertions(+), 8 deletions(-) -- 2.15.1