Received: by 10.192.165.148 with SMTP id m20csp105647imm; Thu, 3 May 2018 15:54:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMlJLnYUNIaqEPlyVytCWUh505wI1H8IoUIKRb0pt1buxz+hnSnzjOBAfO/f2nPuHLqvFJ X-Received: by 2002:a63:9d0c:: with SMTP id i12-v6mr19862369pgd.87.1525388040665; Thu, 03 May 2018 15:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525388040; cv=none; d=google.com; s=arc-20160816; b=ZsAhU3FUt9yoajs0PT2cMU4d4R2bWtxj0PSQFjxsggK9pNawYzjWMk2lW8nptF3pwq 5TQfgGC2KsU2ri4R86SzJvJzp5AdwlKTr71ixQSVHI/hQQB9nScJRaZqrrqYgZEFhjFJ rZxSCoL9qzxTefugnlhfALrTvf77j4AMnbC8hT+z169CkiznC54AZlHYXMsXkXXIeeMO RkvK3G4kkabg1sXZYeH1RsvrNPdYjLOq+6kW17qJzx9Px5f8H5dShrjfgwIkciI69h8v TPR7Ew4AEQk7/Q6GNhGIFAuXrZhQR9Z/dKTx6Sk3/5Sbp3l6VvTv9i9YR3afqWU8WUjD 6fSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=tKrmb7RLxITchrGx233WT/YzsPX/as2YePOxQVw2TSo=; b=qMSIBQkvOb5FVOm9Ghkhc7Y00zDM0qeP9pgLOvICkeEq/KjogeYvmO1WtLDuMxxOQF UMDH6pC5Qf0vkSWBdrSxxORtka93oWlmSS+bMxgWof7i/axaL138K58Vgzt1XtwjZirM PFxbyGxPFk97G9RXdLKPnJWL7e/gahn79WrV+n/tZc4ltvLi/sVXlk/QEW992rhK1kTc WvgBoqoyVyixlbhwiuo23mA4J9wKmbePyI3LRYLHhbI9ff8/2fbQCq3EaPkX8ufEwFTr 1BX/jHZ2ynJE6+EleGLaKAOd2b0AYnNtGBBjW5p1C5M7iAm5YMkhgMPuUiYRcOLl6IA3 f5QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=lx+tAm77; 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 v23si15271780pfl.233.2018.05.03.15.53.46; Thu, 03 May 2018 15:54:00 -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=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=lx+tAm77; 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 S1751412AbeECWx0 (ORCPT + 99 others); Thu, 3 May 2018 18:53:26 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:41350 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbeECWxY (ORCPT ); Thu, 3 May 2018 18:53:24 -0400 Received: by mail-pf0-f193.google.com with SMTP id v63so15874740pfk.8 for ; Thu, 03 May 2018 15:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tKrmb7RLxITchrGx233WT/YzsPX/as2YePOxQVw2TSo=; b=lx+tAm77TDtp2Sz+/8qbqwp62lAjiep7PJroXPjr9sfVnhyM4jAlNM2893Om1bslgR Jee6RmRtMTlnINFxa3hCRJ39sYsUTcgs7lOU3ybvDZ32eARma3Leg7toypKdrSyObhTd 0hIrf607wdD50gy0b85TauRLcPOgqpGhMpGSm2ArD83MwfOdB6RdD7nfi7JOLO16+AGf XASsA6xu0LzsXDoKZMshu3wnPj4EgIwHcYhdys/8b3CX9i9sDEI2LHWZhgX09CvextIl TsOA0Xo08+5j/51jk/1qhXaXlw7MLHJKY5ae1v5rBfMEizC8FThs4P5v/PW5I3RJVxY4 L4wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tKrmb7RLxITchrGx233WT/YzsPX/as2YePOxQVw2TSo=; b=qj6L/g4dcFW55igiC3l4FwzuOmujDqb6xFhsuYGdjWrW4eiyD/Sez+5GAkVfnB3AH0 JGgmQqnMVeokKjzBuJYq3rhwitJPm12neoK6WTRaFPvFBBmEih0Hgbm24FJfOD84rTgg fjepmpqZm2VB1qjDyFH1SscAh3bkD82l2jrYRHtlStHige0fOFu9H5LpYm5wcNAJyoDy h5/I1/vghg7V9fwGDnI5fCaEnYAPfnSifijyw30OsS2OsUdI4wRCAWQFCgGZwMBalwK0 MXTLnQbn5ppF6peHkSoDO9bLjxEGKArtf9a1fIgU3e2dWC6W6ofBa5lrRtL633fCsUtt lCzA== X-Gm-Message-State: ALQs6tCBhvdV0NlBdt4euumvgsfH5CSi9xbLy6Uhn4dYQAE7uja+uSUy wkTU6kT/LatmHtNPY6d4wtM/uV1atrk= X-Received: by 10.98.65.93 with SMTP id o90mr24912678pfa.140.1525388002986; Thu, 03 May 2018 15:53:22 -0700 (PDT) Received: from [192.168.1.211] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id m66sm15979568pfb.82.2018.05.03.15.53.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 15:53:21 -0700 (PDT) Subject: Re: [PATCH v2] fs: Add aio iopriority support for block_dev To: Matthew Wilcox Cc: Adam Manzanares , "viro@zeniv.linux.org.uk" , "bcrl@kvack.org" , "linux-fsdevel@vger.kernel.org" , "linux-aio@kvack.org" , "linux-api@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20180503182114.2797-1-adam.manzanares@wdc.com> <20180503183353.GC1562@bombadil.infradead.org> <47e0a519-37b4-f5e7-0616-8659d11c2b69@wdc.com> <18300bdb-a12f-0b6c-1317-6db3e4391d57@kernel.dk> <20180503224308.GA30823@bombadil.infradead.org> From: Jens Axboe Message-ID: Date: Thu, 3 May 2018 16:53:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180503224308.GA30823@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/3/18 4:43 PM, Matthew Wilcox wrote: > On Thu, May 03, 2018 at 02:24:58PM -0600, Jens Axboe wrote: >> On 5/3/18 2:15 PM, Adam Manzanares wrote: >>> On 5/3/18 11:33 AM, Matthew Wilcox wrote: >>>> Or we could just make ki_hint a u8 or u16 ... seems unlikely we'll need >>>> 32 bits of ki_hint. (currently defined values are 1-5) >>> >>> I like the approach of using a u16 for the ki_hint. I'll update and >>> resubmit. >> >> It's intended to be a mask. If you do shrink it for now, then we need some >> guard code to ensure it can always carry what it needs to. > > ummm ... > > enum rw_hint { > WRITE_LIFE_NOT_SET = 0, > WRITE_LIFE_NONE = RWH_WRITE_LIFE_NONE, > WRITE_LIFE_SHORT = RWH_WRITE_LIFE_SHORT, > ... > > .ki_hint = file_write_hint(filp), > > static inline enum rw_hint file_write_hint(struct file *file) > > #define RWF_WRITE_LIFE_NOT_SET 0 > #define RWH_WRITE_LIFE_NONE 1 > #define RWH_WRITE_LIFE_SHORT 2 > #define RWH_WRITE_LIFE_MEDIUM 3 > #define RWH_WRITE_LIFE_LONG 4 > #define RWH_WRITE_LIFE_EXTREME 5 > > It doesn't look like it's being used as a mask. Right, currently it only supports the life time hint. I'm saying the intent is, for when it's being expanded to cover other hints, is to split up the value into maskable sections. -- Jens Axboe