Received: by 10.192.165.148 with SMTP id m20csp98409imm; Thu, 3 May 2018 15:43:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpiGjNJCx0ElxR7efBQ+nIlO6dN4WdpJ5zbu4ioVNdTR6y/TH8BfhUB9wRWwqMQqCPo6Q5Z X-Received: by 2002:a63:3d8a:: with SMTP id k132-v6mr14078205pga.11.1525387424965; Thu, 03 May 2018 15:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525387424; cv=none; d=google.com; s=arc-20160816; b=nmqfwQex9Txqxu9bRA/pIYwArN40FzDz5eDvtUd+uL6c1byrb15DM9FsWw7ngh9jVr Oi9m1z1cvYPyGAHCDfos3z4andhNOujNfo2rktIFmK8UwhoEiHxFrgOvgreoKLJ8muek maSx66Tz0GmoWKn0BPQkNJ9etq5Q54t6fjihc6Pmc/IEo1rrjT2L8sa788Tyll31+3w8 C3QPmhFMrluTI6nxw+LA7BCr2K1H8PHP9uwtsNfuOXpRwOGr8giXv0JCabJCHrWIp0PZ d2eKpkXkiJJjw0ewa32ySuEoOaYX3XT06pE3zZx1CjXm9w7vQc/x2J1usjF9NXSamLUM YNJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=wrnVbDzaaZwOHTcZfYBrCkgNuoqsHBEu2LT8BODlXpI=; b=ep+Kz10tr86i1oaWJKZPoIyPPMACeDsi051FGzOq7zHx0y/g9WzNwA+U9xIRH/Ad+o n8TemqOnthfXRvZNtOcjtMwNfZiQQhjca9raA8wXThzUJRfrgAXq1/djLEPxzqLvXBit uZwylP5/k6okhlwqCzh/PooLctVDf0156P5XMm/wxD7oy+Q/p+zyEGnSyxYeVy1cvucN XwVoiO81c4Sww7ZsNf8bCOV504Gcso1c4/7aHHUTwYLaY89zn0r04Dc4/HtlDM3DmUuG p8NiQnFEOw7pWSgtJTKAwfLshBI/E2UrVU6+2Z4PStLL/oMl7jpznrGTgQygZyAG4mjS WIPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=fp6swl85; 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 e92-v6si14531494pld.16.2018.05.03.15.43.30; Thu, 03 May 2018 15:43:44 -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=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=fp6swl85; 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 S1751340AbeECWnN (ORCPT + 99 others); Thu, 3 May 2018 18:43:13 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43886 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbeECWnL (ORCPT ); Thu, 3 May 2018 18:43:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZexxP4KPTLXOlo/Uad/mnPgQ/BHuYR0Tc/Ecmmy3Pg8=; b=fp6swl85l5p7h9Rvny4iPXp1p v9zPialSvbx4XM8iHGsMraJ80izygcgNfS6mVP7H7suuRg/MwnZrtmrNwjv/8gNydymKOWSeIkOmK 4pAUIeXTXYvEh0UTFcbtOMhPJfd7cv8xrLFzQ07ipso2wvTCs1HOfhDaSZe0AVnZmUU+O2oESQgrs KMqbTafKwh6Y3QSDaEprGOsLIm0miV2ZP1VBovleKXZ8NkcCaj4vZrC+SX84ItImE3R+O1wWEO8cC 5giwF14KU8s9uwA9Tj3C2XIfliU3pke6CkPowPNP5ibKO8NcpJeIrMICV1H/1kSjngV4atmnGOWXd l2p0Bmr8A==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEMwP-0001j1-0t; Thu, 03 May 2018 22:43:09 +0000 Date: Thu, 3 May 2018 15:43:08 -0700 From: Matthew Wilcox To: Jens Axboe 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" Subject: Re: [PATCH v2] fs: Add aio iopriority support for block_dev Message-ID: <20180503224308.GA30823@bombadil.infradead.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18300bdb-a12f-0b6c-1317-6db3e4391d57@kernel.dk> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.