Received: by 10.192.165.148 with SMTP id m20csp36234imm; Thu, 3 May 2018 14:21:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVwH5wszCsFpEPg7vt7ADzgg9caRLCKYTi15jHLUqcbMgGOVyufOsXKeO45fgZFC/XEX28 X-Received: by 2002:a65:4584:: with SMTP id o4-v6mr20801250pgq.213.1525382488631; Thu, 03 May 2018 14:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525382488; cv=none; d=google.com; s=arc-20160816; b=BQZX1kfYEFRo2L69D5L4o+6HXhYONdvR0WjV8DsvVSy1+vMRH43oVnYTrVFJiCacUG 8Aqq0EJ8571uSB69wSRq+zzgn0MVJ8TvPDN9I8GB2CBObJxfti161UQ2wWwEZDZy5qD8 k3Tn9BIQQMkJswz6rSc6+ZedLY1jYMwaKTfvnTgynvfawizjUGjQgujUd4cTIizNPjzz IdGlYWyh7sGsSDIrLfzi9MSx8T6hv2eDumGG53mNMJYzySCG+39nSpqzpQnVwidQkPBS RKfP7PTsrXi26mphETGuLEZNyBjnK29AfhQwEdLeHzgmVirk5Od6nsKNoOIoDfSCDPC4 v4iQ== 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=YHUNpGbva5GZIRJZdXRzMAOqZlqa5/200n3QFJP6SlE=; b=ZfejrHz72kzYmc06YT8rwtR4/l+2lqLhcCmE/RStsUsLuy29XdZ9fM7WZP1lNVHZKw dZyzm6SWlgrGJ6qkxiTUQuwEA9aHKSUk0NGbvN/jAkmP9jHfiBoug+KX2iphzytpujPj WH47+Qe8z6S4NZex31b3wmbdoDOky6Ugeib4hSCcFIGWSUqtzoXV/oB5BQMHDzWwtO95 Gla8ssiZYrJLgrX3mFD77pHfZN/QMRwZjsiQFtM7SPM9Y7EfBhak5qcx7x8CokprMuny FTBQ2U3JvsSLcxQzsLIQaqQHUSJmuNzZsK0wsvPu8i4nG9s0yvKFHBSo0EVRLVjOJ+Et /A7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ev4ALAU2; 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 g12si1747373pfm.258.2018.05.03.14.21.14; Thu, 03 May 2018 14:21:28 -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=ev4ALAU2; 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 S1751308AbeECVUe (ORCPT + 99 others); Thu, 3 May 2018 17:20:34 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:46314 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbeECVUa (ORCPT ); Thu, 3 May 2018 17:20:30 -0400 Received: by mail-pg0-f42.google.com with SMTP id z4-v6so13991490pgu.13 for ; Thu, 03 May 2018 14:20:30 -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=YHUNpGbva5GZIRJZdXRzMAOqZlqa5/200n3QFJP6SlE=; b=ev4ALAU24vKn7+GeN1H40pesggrcydgZbUnqq9fd3VYlgFiAsysjTLQcUxd0qyPOgc CGr+KeHrdQDzuJhvtVDihcAuEcM6Qgcav3e9lwCZ6du8jQYZYVC23PRLXKliaTz1EW4w laJWSWlbsZgPgTCecvqdA7IQwmJazon7fwgBiCySF7Xg4CA9R+aS6iQA0Enmow2URCVF k4JhY0wTSjKa+ql6j1sQBId4vIkuLtmp5ElI2E9HRdZiz11O4Xhi1lZuNOxDVewXkH1y N+fvZEG5hHb73Ze3wdg6c9opcmn57kEK2CExSZVuO1y2//EKVYRhnRf/Euu7vRod2qJ0 WyBw== 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=YHUNpGbva5GZIRJZdXRzMAOqZlqa5/200n3QFJP6SlE=; b=SIBhebLHXoVHln7+3I+GOjhAv7wQ0D7qkoDkL83rEVcEp5iom0Ufre5vvaSplagJB0 SBIxCvJAlcR4fwNn3PgpBc7zgVPCOaNUhOTHVpFlXoQ7iuPTa3i09xMnxbdeojh9VQk4 XnWJToDduVvIos8hQzgAH3plbZDvy+lTjegAkUL67tdEmM6ongzjLcTgQXE27c+C8ccX 5ozBmBhAJntneaK0sfFnXr8J8Pvn8O6sRh6mFE2tDt81ID8bFHCLXWTPMGOkIKISxhSf VA0VPLMAZe3wIBo4FCPn1+YB25j2ncqfdY05/U/zE0VgCANUUBb7PZERnZ0mqtnXY9QX 9CQA== X-Gm-Message-State: ALQs6tBoH3qLomsEqWljaiUC8ZjYScBDgdu8466Yh3JLBkQ4SAXmUdVd E+8lybmuO5QT+LTM88+QB3zsB1TCE+8= X-Received: by 2002:a65:45c2:: with SMTP id m2-v6mr20369455pgr.433.1525382429740; Thu, 03 May 2018 14:20:29 -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 d19sm31063320pfk.59.2018.05.03.14.20.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 14:20:28 -0700 (PDT) Subject: Re: [PATCH v2] fs: Add aio iopriority support for block_dev To: Adam Manzanares , Matthew Wilcox Cc: "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> From: Jens Axboe Message-ID: <9e3ba3eb-9c41-3b5d-dc12-f9ef573ab53f@kernel.dk> Date: Thu, 3 May 2018 15:20:26 -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: 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 2:58 PM, Adam Manzanares wrote: > > > On 5/3/18 1:24 PM, Jens Axboe wrote: >> On 5/3/18 2:15 PM, Adam Manzanares wrote: >>> >>> >>> On 5/3/18 11:33 AM, Matthew Wilcox wrote: >>>> On Thu, May 03, 2018 at 11:21:14AM -0700, adam.manzanares@wdc.com wrote: >>>>> If we want to avoid bloating struct kiocb, I suggest we turn the private field >>>>> into a union of the private and ki_ioprio field. It seems like the users of >>>>> the private field all use it at a point where we can yank the priority from >>>>> the kiocb before the private field is used. Comments and suggestions welcome. >>>> >>>> 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. >> > > Got it, I'll add the guard to rw_hint_valid along with a comment about > being limited by the size of ki_hint in case we get to a situation where > 16 bits is not enough. Other way around - the API should not be limited by the fact that some smaller type was chosen for an internal structure. Hence the guard/check should not be in rw_hint_valid, but rather around where you assign ki_hint. If/when we do extend the read/write hints, then we'll potentially need to bump ki_hint to accommodate it. -- Jens Axboe