<div dir="ltr">Understood, thank you Stefan</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 29, 2021 at 3:26 PM Stefan Bader <<a href="mailto:stefan.bader@canonical.com">stefan.bader@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 28.06.21 11:37, Gerald Yang wrote:<br>
> Hi Stefan,<br>
> <br>
> I checked and also tried to backport these commits:<br>
> git log --oneline --grep "Fixes: 39d42fa96ba1"<br>
> c87a95dc28b1 dm crypt: defer decryption to a tasklet if interrupts disabled<br>
> 8e14f610159d dm crypt: do not call bio_endio() from the dm-crypt tasklet<br>
> d68b29584c25 dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq<br>
> 8abec36d1274 dm crypt: do not wait for backlogged crypto request completion in<br>
> softirq<br>
> 4a5caa4af0df dm crypt: document new no_workqueue flags<br>
> <br>
> But it failed to build the kernel, I found there are more dependencies need to <br>
> be backported<br>
> Take focal kernel (5.4) for instance, the build error is:<br>
> /home/ubuntu/focal/drivers/md/dm-crypt.c:2768:8: error: ‘dm_report_zones_cb’ <br>
> undeclared (first use in this function); did you mean ‘dm_report_zones_fn’?<br>
> 2768 | dm_report_zones_cb, args);<br>
> <br>
> This function "dm_report_zones_cb" was introduced in this commit in 5.5 kernel:<br>
> git log -L :dm_report_zones_cb:drivers/md/dm.c<br>
> commit d41003513e61dd9d4974cb441d30b63650b85654<br>
> git describe --contains d41003513e61dd9d4974cb441d30b63650b85654<br>
> v5.5-rc1~199^2~1<br>
> <br>
> It reworked "zone reporting"<br>
> d41003513e61 block: rework zone reporting<br>
> <br>
> And modify some other files in block layer<br>
> drivers/md/dm-flakey.c<br>
> drivers/md/dm-linear.c<br>
> drivers/scsi/sd.h<br>
> fs/f2fs/super.c<br>
> include/linux/device-mapper.h<br>
> block/blk-zoned.c<br>
> drivers/block/null_blk.h<br>
> drivers/block/null_blk_zoned.c<br>
> drivers/md/dm-zoned-metadata.c<br>
> drivers/md/dm.c<br>
> drivers/scsi/sd_zbc.c<br>
> include/linux/blkdev.h<br>
> <br>
> I think it could get more dependencies involved for backporting this commit<br>
> <br>
> And the original commit I wanted to backport <br>
> (39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877)<br>
> changes dm-crypt version from 1.19.0 to 1.22.0 for focal kernel (5.4)<br>
> <br>
> Because this is a request from our customer, I would like to ask for advice if <br>
> it's still proper to backport this one and all related commits?<br>
<br>
The amount of follow-up changes which were done upstream to a seemingly simple <br>
functional tweak suggest this change had more complications than even upstream <br>
anticipated. At some point we have to make a decision and for LTS release <br>
kernels this would be rather in favour of stability over feature backports. Even <br>
more so the older a release is (I would acutally never consider feature changes <br>
to Bionic anymore). Groovy nears its end of life and I assume Hirsute already <br>
has this. And somehow the errors of the Focal 5.4 backport sound like a lot of <br>
generic device-mapper infrastructure would have to be backported and that would <br>
put the stability of the kernel at risk.<br>
So I would rather point that customer at the hwe-5.11 kernel which is about to <br>
become the default hwe kernel for Focal.<br>
<br>
-Stefan<br>
<br>
> or it's better to wait for a newer hwe kernel that has this commit included?<br>
> <br>
> Thanks,<br>
> Gerald<br>
> <br>
> On Wed, May 19, 2021 at 3:26 PM Gerald Yang <<a href="mailto:gerald.yang@canonical.com" target="_blank">gerald.yang@canonical.com</a> <br>
> <mailto:<a href="mailto:gerald.yang@canonical.com" target="_blank">gerald.yang@canonical.com</a>>> wrote:<br>
> <br>
>     Thanks Stefan, I will update the SRU with all related commits<br>
> <br>
>     On Tue, May 18, 2021 at 2:42 PM Stefan Bader <<a href="mailto:stefan.bader@canonical.com" target="_blank">stefan.bader@canonical.com</a><br>
>     <mailto:<a href="mailto:stefan.bader@canonical.com" target="_blank">stefan.bader@canonical.com</a>>> wrote:<br>
> <br>
>         On 18.05.21 04:56, Gerald Yang wrote:<br>
>          > BugLink: <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1910976" rel="noreferrer" target="_blank">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1910976</a><br>
>         <<a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1910976" rel="noreferrer" target="_blank">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1910976</a>><br>
> <br>
>         Above should be <a href="https://bugs.launchpad.net/bugs/1910976" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1910976</a><br>
>         <<a href="https://bugs.launchpad.net/bugs/1910976" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1910976</a>> but that could be done<br>
>         when applying. However there seem to be multiple references to this patch<br>
>         following its introduction upstream (see below). That does not sound<br>
>         like just<br>
>         picking this one patch is a good idea.<br>
> <br>
>         -Stefan<br>
> <br>
>          ><br>
>          > === SRU Justification ===<br>
>          > [Impact]<br>
>          > To get better performance for dm-crypt in some cases, bypass kcryptd<br>
>          > workqueue can reduce the overhead in context switch between kworkers,<br>
>          > cherry-pick commit 39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877 from mainline<br>
>          > kernel, and bypass kcryptd workqueue is not enabled by default<br>
>          ><br>
>          > [Fix]<br>
>          > Add flags to bypass kcryptd workqueue<br>
>          ><br>
>          > [Test]<br>
>          > create dm-crypt and setup DM_CRYPT_NO_READ_WORKQUEUE and<br>
>          > DM_CRYPT_NO_WRITE_WORKQUEUE, read/write data and run perf record to see<br>
>          > if read/write to the encrypted device will bypass kcryptd workqueue<br>
>          ><br>
>          > [Regression Potential]<br>
>          > Low, this feature is disabled by default, need to enable manually<br>
>          ><br>
>          > Ignat Korchagin (1):<br>
>          >    dm crypt: add flags to optionally bypass kcryptd workqueues<br>
>          ><br>
>          >   drivers/md/dm-crypt.c | 50 ++++++++++++++++++++++++++++++++++++-------<br>
>          >   1 file changed, 42 insertions(+), 8 deletions(-)<br>
>          ><br>
> <br>
>           > git log --oneline --grep "Fixes: 39d42fa96ba1"<br>
>         c87a95dc28b1 dm crypt: defer decryption to a tasklet if interrupts disabled<br>
>         8e14f610159d dm crypt: do not call bio_endio() from the dm-crypt tasklet<br>
>         d68b29584c25 dm crypt: use GFP_ATOMIC when allocating crypto requests<br>
>         from softirq<br>
>         8abec36d1274 dm crypt: do not wait for backlogged crypto request<br>
>         completion in<br>
>         softirq<br>
>         4a5caa4af0df dm crypt: document new no_workqueue flags<br>
> <br>
<br>
<br>
</blockquote></div>