From: Arnd Bergmann <arnd@arndb.de>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
axboe@kernel.dk, Alasdair G Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@redhat.com, neilb@suse.com, tj@kernel.org,
jmoyer@redhat.com, keith.busch@intel.com,
bart.vanassche@sandisk.com, linux-raid@vger.kernel.org,
Mark Brown <broonie@kernel.org>,
"Garg, Dinesh" <dineshg@quicinc.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] Introduce the request handling for dm-crypt
Date: Thu, 12 Nov 2015 13:57:27 +0100 [thread overview]
Message-ID: <4436790.rotQ3a7v5c@wuerfel> (raw)
In-Reply-To: <CAMz4kuLmGfyae=PXb8keuCpkEFDdXZzvuBtUiJHRAz0P55mxXg@mail.gmail.com>
On Thursday 12 November 2015 20:51:10 Baolin Wang wrote:
> On 12 November 2015 at 20:24, Jan Kara <jack@suse.cz> wrote:
> > On Thu 12-11-15 19:46:26, Baolin Wang wrote:
> >> On 12 November 2015 at 19:06, Jan Kara <jack@suse.cz> wrote:
> >> > Well, one question is "can handle" and other question is how big gain in
> >> > throughput it will bring compared to say 1M chunks. I suppose there's some
> >> > constant overhead to issue a request to the crypto hw and by the time it is
> >> > encrypting 1M it may be that this overhead is well amortized by the cost of
> >> > the encryption itself which is in principle linear in the size of the
> >> > block. That's why I'd like to get idea of the real numbers...
> >>
> >> Please correct me if I misunderstood your point. Let's suppose the AES
> >> engine can handle 16M at one time. If we give the size of data is less
> >> than 16M, the engine can handle it at one time. But if the data size
> >> is 20M (more than 16M), the engine driver will split the data with 16M
> >> and 4M to deal with. I can not say how many numbers, but I think the
> >> engine is like to big chunks than small chunks which is the hardware
> >> engine's advantage.
> >
> > No, I meant something different. I meant that if HW can encrypt 1M in say
> > 1.05 ms and it can encrypt 16M in 16.05 ms, then although using 16 M blocks
> > gives you some advantage it becomes diminishingly small.
> >
>
> But if it encrypts 16M with 1M one by one, it will be much more than
> 16.05ms (should be consider the SW submits bio one by one).
The example that Jan gave was meant to illustrate the case where it's not
much more than 16.05ms, just slightly more.
The point is that we need real numbers to show at what size we stop
getting significant returns from increased block sizes.
> >> >> > You mentioned that you use requests because of size limitations on bios - I
> >> >> > had a look and current struct bio can easily describe 1MB requests (that's
> >> >> > assuming 64-bit architecture, 4KB pages) when we have 1 page worth of
> >> >> > struct bio_vec. Is that not enough?
> >> >>
> >> >> Usually one bio does not always use the full 1M, maybe some 1k/2k/8k
> >> >> or some other small chunks. But request can combine some sequential
> >> >> small bios to be a big block and it is better than bio at least.
> >> >
> >> > As Christoph mentions 4.3 should be better in submitting larger bios. Did
> >> > you check it?
> >>
> >> I'm sorry I didn't check it. What's the limitation of one bio on 4.3?
> >
> > On 4.3 it is 1 MB (which should be enough because requests are limited to
> > 512 KB by default anyway). Previously the maximum bio size depended on the
> > queue parameters such as max number of segments etc.
>
> But it maybe not enough for HW engine which can handle maybe 10M/20M
> at one time.
Given that you have already done measurements, can you find out how much
you lose in overall performance with your existing patch if you artificially
limit the maximum size to sizes like 256kb, 1MB, 4MB, ...?
Arnd
next prev parent reply other threads:[~2015-11-12 12:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 9:31 [PATCH 0/2] Introduce the request handling for dm-crypt Baolin Wang
2015-11-11 9:31 ` [PATCH 1/2] block: Introduce BIO_ENDIO_FREE for bio flags Baolin Wang
2015-11-11 17:54 ` Mike Snitzer
2015-11-12 4:05 ` Baolin Wang
2015-11-11 9:31 ` [PATCH 2/2] md: dm-crypt: Introduce the request handling for dm-crypt Baolin Wang
2015-11-11 9:48 ` [PATCH 0/2] " Christoph Hellwig
2015-11-12 2:15 ` Baolin Wang
2015-11-12 9:17 ` Jan Kara
2015-11-12 9:40 ` Baolin Wang
2015-11-12 11:06 ` Jan Kara
2015-11-12 11:46 ` Baolin Wang
2015-11-12 12:24 ` Jan Kara
2015-11-12 12:51 ` Baolin Wang
2015-11-12 12:57 ` Arnd Bergmann [this message]
2015-11-12 15:02 ` Mark Brown
2015-11-13 3:27 ` Baolin Wang
2015-11-13 3:25 ` Baolin Wang
2015-11-12 12:59 ` Jan Kara
2015-11-13 2:05 ` Baolin Wang
2015-11-13 9:05 ` Arnd Bergmann
2015-11-13 11:37 ` Baolin Wang
2015-11-11 18:18 ` Mike Snitzer
2015-11-12 2:36 ` Baolin Wang
2015-11-12 9:06 ` [dm-devel] " Christoph Hellwig
2015-11-12 8:20 ` Baolin Wang
2015-11-12 10:04 ` Mark Brown
2015-11-12 15:26 ` Jens Axboe
2015-11-13 2:07 ` Baolin Wang
2015-11-13 11:51 ` Mark Brown
2015-12-02 12:46 ` Baolin Wang
2015-12-02 19:56 ` [dm-devel] " Alasdair G Kergon
2015-12-03 2:56 ` Baolin Wang
2015-12-03 10:36 ` Baolin Wang
2015-12-03 11:07 ` Zdenek Kabelac
2015-12-03 11:27 ` Baolin Wang
2015-12-03 15:49 ` Mikulas Patocka
2015-12-04 4:58 ` Baolin Wang
2015-12-03 15:47 ` Mikulas Patocka
2015-12-04 4:57 ` Baolin Wang
2015-11-12 9:05 ` 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=4436790.rotQ3a7v5c@wuerfel \
--to=arnd@arndb.de \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=baolin.wang@linaro.org \
--cc=bart.vanassche@sandisk.com \
--cc=broonie@kernel.org \
--cc=dineshg@quicinc.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=snitzer@redhat.com \
--cc=tj@kernel.org \
/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