All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Tejun Heo <tj@kernel.org>,
	device-mapper development <dm-devel@redhat.com>,
	Lisa Du <chunlingdu1@gmail.com>,
	"Alasdair G. Kergon" <agk@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: Re: dm-crypt: remove per-cpu structure
Date: Sat, 22 Feb 2014 11:28:35 +0100	[thread overview]
Message-ID: <53087BD3.1000900@gmail.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1402210238470.5846@file01.intranet.prod.int.rdu2.redhat.com>

On 02/21/2014 08:41 AM, Mikulas Patocka wrote:
>>>> Hi Mikulas,
>>>>
>>>> Obviously avoiding crashes is more important than performance.

Yes, but please keep these changes in linux-next for a while
before submitting this for stable or you will fix one rare bug and
slow down all existing users (with possible another fix to fix later)...

I know that taking cpu offline becomes more used these days
but still the performance is critical attribute for dmcrypt.

(And IIRC this cpu work relocation problem is there for years.)

>>>> But are we losing performance by switching away from using percpu?  Do
>>>> we care?  I'd like to see the header to speak to the potential for
>>>> slowdown (if there is any).
>>>
>>> There is one more allocation per request than before. I don't know how 
>>> much does it cost.

Could you please try it on some test machine in lab? I think Red Hat has
enough usable machines for such tests.

>> OK, any reason you didn't fix this up by using cpu hotplug hooks like
>> Tejun suggested?  Too complicated?
> 
> Yes, it would complicate the code. The patch that removes percpu pointers 
> shortens the file, using cpu hotplug hooks would make it bigger.

Since we prefer source file size to correct solution?

That said, dmcrypt becomes already too big. I already thought about separating
some things (keeping the core functionality in one place), e.g. IV generators
implementation is something what could be logically separated.
(Is it worth to do it?)

>>> We could also modify the code to use per_bio_data to save one allocation.
>>
>> OK, sounds like a good win.  Can you write a separate followup patch
>> that makes use of per_bio_data?
> 
> I will try it.

If you have some performance numbers, post it as well please.
(I would not be surprised that removing percpu struct is sometimes even better
for performance but this is just wild guess.)

And if you have better solution to dmcrypt parallel performance, post it too
but with real hw (with and without crypto acceleration) speed up numbers please. ;-)

Thanks,
Milan

  reply	other threads:[~2014-02-22 10:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 23:01 [PATCH] dm-crypt: remove per-cpu structure Mikulas Patocka
2014-02-20 23:59 ` Mike Snitzer
2014-02-21  0:10   ` Mikulas Patocka
2014-02-21  2:32     ` Mike Snitzer
2014-02-21  7:41       ` Mikulas Patocka
2014-02-22 10:28         ` Milan Broz [this message]
2014-02-22 14:25           ` Mike Snitzer
2014-02-22 17:34             ` Milan Broz
2014-02-22 18:29               ` Mike Snitzer
2014-02-22 18:58                 ` Milan Broz
2014-02-27  1:12               ` Mikulas Patocka

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=53087BD3.1000900@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=agk@redhat.com \
    --cc=chunlingdu1@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.