Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1076229yba; Sun, 31 Mar 2019 22:03:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1lfHVQABdbqNmQONcaaM8oFhlygPBCrkQoFNGVl3RLMPvZoXBNFT+5QS7nP0w2vFwV41t X-Received: by 2002:a17:902:aa87:: with SMTP id d7mr60421419plr.146.1554095035412; Sun, 31 Mar 2019 22:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554095035; cv=none; d=google.com; s=arc-20160816; b=ga+2Wof/vXw2ZruF76FDIlPAuZ/EtAUbLvBKOlHxhSj96EdPzaU5hhYFTiDy8ci6l5 fJ8b1pJ+b95+OTWjVIbWHO9RHdrNk/dNxZ8NjmG7/rJuxU4/dNUgehqUhZFTZVHZGvBk suL9AVFXXTwNHG3DRuXR+a8w194/mYTRUrajvk6m40ygY6wxMzNzbuLWm67j5+0vzhbT DpKcw7qLJoa5oCbHsC8qkWhyVxLEZ8/xxLghSQkEFI04T5+RgWDGl+arT3t5mOaX6d43 fYSe4j0qBWHHz/ZBUZr16WF2MhM4QlzR6t8e2Wu4WY8N6AoRUx9zoZqblNg4rNLtBy/6 Vz1g== 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; bh=8w8IObRUUPw71E7cVR2bnAWwzClLCwM/+E44Yz+W+5w=; b=pKEIZbfZDu7lv2nhpim44Kyf8NSV7y4eNHwgsoeWNFkyCfzbtEMP4mtLyIsrgMSGz5 Pcs9a1GiI61ZyIv9j2a3VaXVrPlrFRpeNuvT2ZytTrde8o27iLJyTsmRH3uIurWYAt8z al1hvSKf5QdGHYgo54f+/2ib4TbAc4arQy6J3qc6Xl0Acy7I3AxNj+YoYm0AIKVGnOxe LqwTrI3Zr6/aui6amZLciRsAbpShfQOWJaut1x7l+q9xgJacZgIX/meTIo/npU8hpKfN C0enuZgihesp+/8hbYTOAo7Ue/AirfCoUaSHZzOdL1ngbv2wQf5wQCHPh/YhCyDbc/m2 toNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 m16si5099083pls.150.2019.03.31.22.03.39; Sun, 31 Mar 2019 22:03:55 -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; 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 S1726918AbfDAFDE (ORCPT + 99 others); Mon, 1 Apr 2019 01:03:04 -0400 Received: from ipmail03.adl6.internode.on.net ([150.101.137.143]:30778 "EHLO ipmail03.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbfDAFDD (ORCPT ); Mon, 1 Apr 2019 01:03:03 -0400 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail03.adl6.internode.on.net with ESMTP; 01 Apr 2019 15:32:57 +1030 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1hAp5z-0004MY-CL; Mon, 01 Apr 2019 16:02:55 +1100 Date: Mon, 1 Apr 2019 16:02:55 +1100 From: Dave Chinner To: Kanchan Joshi Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, axboe@fb.com, prakash.v@samsung.com, anshul@samsung.com, joshiiitr@gmail.com Subject: Re: [PATCH v3 1/7] block: extend stream count for in-kernel use Message-ID: <20190401050255.GP23020@dastard> References: <1553846032-4451-1-git-send-email-joshi.k@samsung.com> <1553846032-4451-2-git-send-email-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1553846032-4451-2-git-send-email-joshi.k@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 29, 2019 at 01:23:46PM +0530, Kanchan Joshi wrote: > This patch bumps up stream count to suppor in-kernel hints. It also > adds 'streamid' member in 'request' and declares new API for driver > to register stream-info with block layer. > > Signed-off-by: Kanchan Joshi > --- > include/linux/blkdev.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 338604d..4088e21 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -214,6 +214,7 @@ struct request { > #endif > > unsigned short write_hint; > + unsigned short streamid; > unsigned short ioprio; > > void *special; /* opaque pointer available for LLD use */ > @@ -341,6 +342,8 @@ struct queue_limits { > unsigned char misaligned; > unsigned char discard_misaligned; > unsigned char raid_partial_stripes_expensive; > + > + unsigned short nr_streams; > enum blk_zoned_model zoned; > }; > > @@ -567,8 +570,9 @@ struct request_queue { > size_t cmd_size; > > struct work_struct release_work; > - > -#define BLK_MAX_WRITE_HINTS 5 > +#define BLK_MAX_USER_HINTS (WRITE_LIFE_KERN_MIN - 2) WRITE_LIFE_KERN_MIN is undefined. -Dave. > +#define BLK_MAX_KERN_HINTS 4 > +#define BLK_MAX_WRITE_HINTS (1 + BLK_MAX_USER_HINTS + BLK_MAX_KERN_HINTS) > u64 write_hints[BLK_MAX_WRITE_HINTS]; > }; > > @@ -1071,6 +1075,7 @@ extern void blk_queue_update_dma_alignment(struct request_queue *, int); > extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); > extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable); > extern void blk_queue_write_cache(struct request_queue *q, bool enabled, bool fua); > +extern void blk_queue_stream_limits(struct request_queue *, unsigned short); > > /* > * Number of physical segments as sent to the device. > -- > 2.7.4 > > -- Dave Chinner david@fromorbit.com