public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@fb.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
	<ming.l@ssi.samsung.com>, <david@fromorbit.com>
Subject: Re: [PATCH 1/7] block: add support for carrying a stream ID in a bio
Date: Sat, 18 Apr 2015 13:53:14 -0600	[thread overview]
Message-ID: <5532B62A.3010906@fb.com> (raw)
In-Reply-To: <E227B6B0-F6D8-468A-80E9-7DEB3AF833EE@dilger.ca>

On 04/09/2015 04:46 PM, Andreas Dilger wrote:
> On Mar 25, 2015, at 9:07 AM, Jens Axboe <axboe@fb.com> wrote:
>>
>> The top bits of bio->bi_flags are reserved for keeping the
>> allocation pool, set aside the next eight bits for carrying
>> a stream ID. That leaves us with support for 255 streams,
>> 0 is reserved as a "stream not set" value.
>
> I understand that the stream ID is not related to specific priority
> of an IO request.  However, I'm wondering how this patch series
> interacts with some of the other patch series that add cache priority
> hints?  Is there a danger of running out of space in the IO pipeline
> for the additional cache hints if this is using 8 bits?

That's always a risk, of course, but that goes for most features that 
need to carry more data in struct bio (or elsewhere). Otherwise we'll 
have to bite the bullet and add a new field.

>> +/*
>> + * after the pool bits, next 8 bits are for the stream id
>> + */
>> +#define BIO_STREAM_BITS		(8)
>> +#define BIO_STREAM_OFFSET	(BITS_PER_LONG - 12)
>
> Should this really be:
>
> #define BIO_STREAM_OFFSET	(BIO_POOL_OFFSET - BIO_STREAM_BITS)
>
> Otherwise there is a risk of conflict if someone changes BIO_POOL_BITS.

Good point, that would be cleaner. I'll make that change.

-- 
Jens Axboe


  reply	other threads:[~2015-04-18 19:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 15:07 [PATCH RFC v2] Support for write stream IDs Jens Axboe
2015-03-25 15:07 ` [PATCH 1/7] block: add support for carrying a stream ID in a bio Jens Axboe
2015-04-09 22:46   ` Andreas Dilger
2015-04-18 19:53     ` Jens Axboe [this message]
2015-03-25 15:07 ` [PATCH 2/7] Add support for per-file stream ID Jens Axboe
2015-04-09  9:30   ` Dmitry Monakhov
2015-04-09 16:28     ` Jens Axboe
2015-04-09 23:22   ` Andreas Dilger
2015-04-18 19:51     ` Jens Axboe
2015-03-25 15:07 ` [PATCH 3/7] direct-io: add support for write stream IDs Jens Axboe
2015-03-25 15:07 ` [PATCH 4/7] Add stream ID support for buffered mpage/__block_write_full_page() Jens Axboe
2015-03-25 22:42   ` Ming Lin-SSI
2015-03-25 23:08     ` Jens Axboe
2015-03-25 15:07 ` [PATCH 5/7] btrfs: add support for write stream IDs Jens Axboe
2015-03-25 16:00   ` Chris Mason
2015-03-25 15:07 ` [PATCH 6/7] xfs: add support for buffered writeback stream ID Jens Axboe
2015-03-25 15:07 ` [PATCH 7/7] ext4: add support for write stream IDs Jens Axboe
2015-03-26 20:34   ` Ming Lin-SSI
2015-03-26 20:39     ` Jens Axboe
2015-03-25 16:05 ` [PATCH RFC v2] Support " Jeff Moyer
2015-03-25 16:46   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2015-04-18 20:03 [PATCH " Jens Axboe
2015-04-18 20:03 ` [PATCH 1/7] block: add support for carrying a stream ID in a bio Jens Axboe
2015-05-05 20:02 [PATCH v2] Support for write stream IDs Jens Axboe
2015-05-05 20:02 ` [PATCH 1/7] block: add support for carrying a stream ID in a bio Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5532B62A.3010906@fb.com \
    --to=axboe@fb.com \
    --cc=adilger@dilger.ca \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.l@ssi.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox