Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-24 Thread Ignat Korchagin
On Wed, Jun 24, 2020 at 6:22 AM Mike Snitzer wrote: > > On Wed, Jun 24 2020 at 12:54am -0400, > Damien Le Moal wrote: > > > On 2020/06/24 0:23, Mike Snitzer wrote: > > > On Tue, Jun 23 2020 at 11:07am -0400, > > > Ignat Korchagin wrote: > > > > > >> Do you think it may be better to break it in t

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Mike Snitzer
On Wed, Jun 24 2020 at 12:54am -0400, Damien Le Moal wrote: > On 2020/06/24 0:23, Mike Snitzer wrote: > > On Tue, Jun 23 2020 at 11:07am -0400, > > Ignat Korchagin wrote: > > > >> Do you think it may be better to break it in two flags: one for read > >> path and one for write? So, depending on

Re: [dm-devel] [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Damien Le Moal
On 2020/06/24 0:23, Mike Snitzer wrote: > On Tue, Jun 23 2020 at 11:07am -0400, > Ignat Korchagin wrote: > >> Do you think it may be better to break it in two flags: one for read >> path and one for write? So, depending on the needs and workflow these >> could be enabled independently? > > If th

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Damien Le Moal
On 2020/06/24 0:01, Mike Snitzer wrote: > On Sun, Jun 21 2020 at 8:45pm -0400, > Damien Le Moal wrote: > >> On 2020/06/20 1:56, Mike Snitzer wrote: >>> On Fri, Jun 19 2020 at 12:41pm -0400, >>> Ignat Korchagin wrote: >>> This is a follow up from the long-forgotten [1], but with some more

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Herbert Xu
On Tue, Jun 23, 2020 at 05:24:39PM +0100, Ignat Korchagin wrote: > > I may be misunderstanding the terminology, but tasklets execute in > soft IRQ, don't they? What we care about is to execute the decryption > as fast as possible, but we can't do it in a hard IRQ context (that > is, the interrupt

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Ignat Korchagin
On Tue, Jun 23, 2020 at 4:34 PM Mike Snitzer wrote: > > On Fri, Jun 19 2020 at 9:23pm -0400, > Herbert Xu wrote: > > > On Fri, Jun 19, 2020 at 02:39:39PM -0400, Mikulas Patocka wrote: > > > > > > I'm looking at this and I'd like to know why does the crypto API fail in > > > hard-irq context and

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Mike Snitzer
On Fri, Jun 19 2020 at 9:23pm -0400, Herbert Xu wrote: > On Fri, Jun 19, 2020 at 02:39:39PM -0400, Mikulas Patocka wrote: > > > > I'm looking at this and I'd like to know why does the crypto API fail in > > hard-irq context and why does it work in tasklet context. What's the exact > > reason b

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Mike Snitzer
On Tue, Jun 23 2020 at 11:07am -0400, Ignat Korchagin wrote: > Do you think it may be better to break it in two flags: one for read > path and one for write? So, depending on the needs and workflow these > could be enabled independently? If there is a need to split, then sure. But I think Damie

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Ignat Korchagin
Do you think it may be better to break it in two flags: one for read path and one for write? So, depending on the needs and workflow these could be enabled independently? Regards, Ignat On Tue, Jun 23, 2020 at 4:01 PM Mike Snitzer wrote: > > On Sun, Jun 21 2020 at 8:45pm -0400, > Damien Le Moal

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-23 Thread Mike Snitzer
On Sun, Jun 21 2020 at 8:45pm -0400, Damien Le Moal wrote: > On 2020/06/20 1:56, Mike Snitzer wrote: > > On Fri, Jun 19 2020 at 12:41pm -0400, > > Ignat Korchagin wrote: > > > >> This is a follow up from the long-forgotten [1], but with some more > >> convincing > >> evidence. Consider the fo

Re: [dm-devel] [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-22 Thread Damien Le Moal
On 2020/06/22 16:55, Ignat Korchagin wrote: > On Mon, Jun 22, 2020 at 1:45 AM Damien Le Moal wrote: >> >> On 2020/06/20 1:56, Mike Snitzer wrote: >>> On Fri, Jun 19 2020 at 12:41pm -0400, >>> Ignat Korchagin wrote: >>> This is a follow up from the long-forgotten [1], but with some more

Re: [dm-devel] [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-22 Thread Ignat Korchagin
On Mon, Jun 22, 2020 at 1:45 AM Damien Le Moal wrote: > > On 2020/06/20 1:56, Mike Snitzer wrote: > > On Fri, Jun 19 2020 at 12:41pm -0400, > > Ignat Korchagin wrote: > > > >> This is a follow up from the long-forgotten [1], but with some more > >> convincing > >> evidence. Consider the followin

Re: [dm-devel] [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-21 Thread Damien Le Moal
On 2020/06/20 1:56, Mike Snitzer wrote: > On Fri, Jun 19 2020 at 12:41pm -0400, > Ignat Korchagin wrote: > >> This is a follow up from the long-forgotten [1], but with some more >> convincing >> evidence. Consider the following script: >> >> #!/bin/bash -e >> >> # create 4G ramdisk >> sudo modpr

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-20 Thread Ignat Korchagin
Yes, it should. I got one when I was testing the first iteration (without the tasklet) of the patch on an NVME? disk. On Sat, Jun 20, 2020 at 8:36 PM Mikulas Patocka wrote: > > > > On Sat, 20 Jun 2020, Herbert Xu wrote: > > > On Fri, Jun 19, 2020 at 02:39:39PM -0400, Mikulas Patocka wrote: > > >

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-20 Thread Mikulas Patocka
On Sat, 20 Jun 2020, Herbert Xu wrote: > On Fri, Jun 19, 2020 at 02:39:39PM -0400, Mikulas Patocka wrote: > > > > I'm looking at this and I'd like to know why does the crypto API fail in > > hard-irq context and why does it work in tasklet context. What's the exact > > reason behind this? >

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-19 Thread Herbert Xu
On Fri, Jun 19, 2020 at 02:39:39PM -0400, Mikulas Patocka wrote: > > I'm looking at this and I'd like to know why does the crypto API fail in > hard-irq context and why does it work in tasklet context. What's the exact > reason behind this? You're not supposed to do any real work in IRQ handlers

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-19 Thread Ignat Korchagin
On Fri, Jun 19, 2020 at 7:39 PM Mikulas Patocka wrote: > > > > On Fri, 19 Jun 2020, Mike Snitzer wrote: > > > On Fri, Jun 19 2020 at 12:41pm -0400, > > Ignat Korchagin wrote: > > > > > This is a follow up from the long-forgotten [1], but with some more > > > convincing > > > evidence. Consider t

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-19 Thread Mikulas Patocka
On Fri, 19 Jun 2020, Mike Snitzer wrote: > On Fri, Jun 19 2020 at 12:41pm -0400, > Ignat Korchagin wrote: > > > This is a follow up from the long-forgotten [1], but with some more > > convincing > > evidence. Consider the following script: > > > > [1]: https://www.spinics.net/lists/dm-crypt

Re: [RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-19 Thread Mike Snitzer
On Fri, Jun 19 2020 at 12:41pm -0400, Ignat Korchagin wrote: > This is a follow up from the long-forgotten [1], but with some more convincing > evidence. Consider the following script: > > #!/bin/bash -e > > # create 4G ramdisk > sudo modprobe brd rd_nr=1 rd_size=4194304 > > # create a dm-cryp

[RFC PATCH 0/1] dm-crypt excessive overhead

2020-06-19 Thread Ignat Korchagin
This is a follow up from the long-forgotten [1], but with some more convincing evidence. Consider the following script: #!/bin/bash -e # create 4G ramdisk sudo modprobe brd rd_nr=1 rd_size=4194304 # create a dm-crypt device with NULL cipher on top of /dev/ram0 echo '0 8388608 crypt capi:ecb(ciph