linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/2] block: integrity: enable multi-page bvec for bio integrity
Date: Wed, 24 Apr 2019 21:18:35 +0800	[thread overview]
Message-ID: <20190424131834.GA19829@ming.t460p> (raw)
In-Reply-To: <yq1ftq78s03.fsf@oracle.com>

On Wed, Apr 24, 2019 at 09:14:36AM -0400, Martin K. Petersen wrote:
> 
> Ming,
> 
> I'm traveling today and probably won't be able to take a closer look
> until tomorrow. But from a quick glance this looks OK.
> 
> > The integrity buffer can't be very big, for example, the max sectors
> > for one bio is 2560, one sector may take at most 8bytes for integrity
> > info, so the max size of integrity buffer is just 20k(<=5 pages).
> 
> Just a comment on your rationale about 5 pages.
> 
> buffer_head submissions have traditionally been small, and depending on
> your choice of allocator, new allocations would grow backwards in
> memory. So there were several common I/O patterns that produced a
> single, non-mergeable 8 byte integrity metadata allocation for every 512
> bytes of data in the I/O. It's a pathological corner case. Just make
> sure it's something you handle when you muck with this. ext[23] and dd
> to the block device used to be able to reproduce this scenario easily.

Yeah, you are right.

I have realized that 5 pages aren't correct, and it should be one
protection data segment for each bio usually.

Thanks,
Ming

  reply	other threads:[~2019-04-24 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  7:15 [PATCH 0/2] block: enable multi-page bvec for bio integrity Ming Lei
2019-04-23  7:15 ` [PATCH 1/2] block: integrity: " Ming Lei
2019-04-24  5:40   ` Christoph Hellwig
2019-04-24 13:14   ` Martin K. Petersen
2019-04-24 13:18     ` Ming Lei [this message]
2019-04-23  7:15 ` [PATCH 2/2] block: integrity: simplify bio_integrity_prep Ming Lei
2019-04-24  5:42   ` Christoph Hellwig

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=20190424131834.GA19829@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).