Received: by 10.192.165.148 with SMTP id m20csp5586404imm; Wed, 9 May 2018 07:23:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpNtT9WEjxHYsIa6+yn6kw99UDnwtevlPwpDh9l+hhniyaHPFvM5bzcsidhmRa+ms8wBhfO X-Received: by 10.98.32.199 with SMTP id m68mr22535740pfj.110.1525875814837; Wed, 09 May 2018 07:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525875814; cv=none; d=google.com; s=arc-20160816; b=RqyuO2Qkutonc4ubJ2VumJPLo1I+ddWYRE/8ogrorXZeuJh3SmaLf6AAzFewLNDgB+ LSQoLMGM51QyqDGp7r6ewBIJRiwh+rml/uWRWuKGx3boXiQtKPvB/dQYTzgqVTcMIXop 8dD8TD4ix9Ff+MDL6mdPGfa+pmI1YNGaFgB1JgigV9liOguT9eGtacGUzagPouV6GiVA RLUSmd0BS4CtI5WGOxQYJkEk68Y0geMLCTVfWkQy3JWgli0eUDPYgTXG5zQM9mSMhZ0l U3stio9BdH0hxteuNvZWkPWTbMcQsYcM/p513KW6VJwiXeGUoLT26xAFn40NJE1Ap2C/ 6Zsw== 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:to:subject:dkim-signature :arc-authentication-results; bh=IDFUkZ1W24KTZJPzZ1/EVF4YpItZXSPIlTci+ivsFNk=; b=YuJUPk4RI6lKXHYn4Gsc5bwjnxKOwuLjVqcUh/D8cngn9l2+HDeILrxSXMHh9u/nK8 8n6h/mLRTdJAC9z9CknTLjxISKa57xXS+HxoNmOAMmbycNUkrRdsxIuKnkPi5uXK/L9u FyAnsd/tWJJB/XiFoLcUWgWiW+AZF36xDvAQdW4Ae1sgf9vm2A7gVYGwQExS2HqxeQO+ bG8/wRtJeUtWvUa2SwnR8jXKQSWL7u8d6x/ChwpBUrpKhBc2yU16TgXBh07TsiIIePPp M7xzA9vY4jTRQKszpgXUaGiPOOlD1pvLl0zaHYVf1KzDN0yIW8UW0ZcgZDoaFOdG+smf U8kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Afz8gY8q; 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 g33-v6si27477893plb.297.2018.05.09.07.23.17; Wed, 09 May 2018 07:23:34 -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=Afz8gY8q; 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 S935010AbeEIOXF (ORCPT + 99 others); Wed, 9 May 2018 10:23:05 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:35680 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934976AbeEIOXD (ORCPT ); Wed, 9 May 2018 10:23:03 -0400 Received: by mail-it0-f68.google.com with SMTP id q72-v6so10639303itc.0 for ; Wed, 09 May 2018 07:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=IDFUkZ1W24KTZJPzZ1/EVF4YpItZXSPIlTci+ivsFNk=; b=Afz8gY8q0Wb13B5UWmvwI1y8snpu2s8hFSRLiy8rPKQ8jpsBhbf2Mam+/fPQgWHCeE kp5Gps821VPLASvjs4/kCsmHHqOl6fb4PbeQVAAskeENoBr/5azxnaGyEzDtQBYG5wQS wUEJicRs/jC19y+jP7MDZ5mlXLq+lHFN0eRyjVZEf+KHEZVcTjeFxQidtN2FGwuYIWPS TZvrKdZIhQF00j13dfcgKl/NuYrWgxhYA9sa7p4TOuV7DRHgvVEwa4HKRWl+duqzcgNy fiTyU7sWJpFv0yhbXIvM5PzjUxZen7FEHq9VVsDglNaxD3nPqZbPkW4+rvgX0y0cH0El fGNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IDFUkZ1W24KTZJPzZ1/EVF4YpItZXSPIlTci+ivsFNk=; b=q2CGyeKetHoaZW29qjZFjJ2ZvOwi1uIBfPkHaUexgsghnj13jIMKEtaCgU9xEIbAOn SXqa4WrKE8wrpUkhuZiveKWr7p0Rg4AXvdlPP/UErWakJZkKnE1KuNIuiRoqFAyDOyIC Dgr+JivnzuUz9u8yWwMT68t+kWy74j8oPIxM3jqrYast+FYUB6yJia8imfIOYrsLwpOB BgcWqEuU42gpTtaQTDKFXoAI1U3tOLm1F+4flI6QBPn6TQJcAX4qx8vUt0aMvs1mwKGz 70d8ofjsYbUOpF1IY8Q4H2gb/7zdbtykNE3xR2d68avWvX6pCnT92x9QSCMp6YS/n98M HRIQ== X-Gm-Message-State: ALKqPwfBrNQhb1634Nu/bEpSc/3zmFR5gYgVPS0aCMeOvOZJFpuYQJar uRQpoMlqtx2FEayazb/Vho2U0GbRtfI= X-Received: by 2002:a24:7292:: with SMTP id x140-v6mr10138993itc.14.1525875782507; Wed, 09 May 2018 07:23:02 -0700 (PDT) Received: from [192.168.1.167] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 142-v6sm11363484ion.21.2018.05.09.07.23.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 07:23:01 -0700 (PDT) Subject: Re: [PATCH v3 2/3] fs: Convert kiocb rw_hint from enum to u16 To: "Theodore Y. Ts'o" , adam.manzanares@wdc.com, 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: <20180508174202.2537-1-adam.manzanares@wdc.com> <20180508174202.2537-3-adam.manzanares@wdc.com> <20180509133432.GD28388@thunk.org> From: Jens Axboe Message-ID: <0aad993b-448c-3586-cfc0-f2e50b1dda28@kernel.dk> Date: Wed, 9 May 2018 08:23:00 -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: <20180509133432.GD28388@thunk.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/9/18 7:34 AM, Theodore Y. Ts'o wrote: > On Tue, May 08, 2018 at 10:42:01AM -0700, adam.manzanares@wdc.com wrote: >> diff --git a/include/linux/fs.h b/include/linux/fs.h >> index 760d8da1b6c7..7a90ce387e00 100644 >> --- a/include/linux/fs.h >> +++ b/include/linux/fs.h >> @@ -284,6 +284,8 @@ enum rw_hint { >> WRITE_LIFE_EXTREME = RWH_WRITE_LIFE_EXTREME, >> }; >> >> +#define MAX_KI_HINT ((1 << 16) - 1) /* ki_hint type is u16 */ >> + > > Do we really think there will be *ever* be a need for more than 16 I/O > priority levels? I would much rather use the low four bits of KI_HINT > for the priority level, and reserve the rest of the 16 bits in KI_HINT > for some future use. (For example, we might want to use some number > of bits for a stream ID.) Streams is essentially the only thing ki_hint is currently used for, with the write life time hints mapping to a stream. The idea for the user side API was to have other things than just write life time hints. Since Adam wants to do priorities, he'd either need to pack into the existing ki_hint, or do this patch does, which is make it smaller and add a new member. I think the latter is cleaner. -- Jens Axboe