linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
Subsystems (3)
[email protected]
maintainerHi all,
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/idxd/submit.c
between commit:
8affd8a4b5ce3 ("dmaengine: idxd: fix missed completion on abort path")
from the dmaengine-fixes tree and commit:
5d78abb6fbc97 ("dmaengine: idxd: rework descriptor free path on failure")
from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/dma/idxd/submit.c +0 -0
@@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idxspin_unlock (&ie->list_lock);if (found) -complete_desc (found,IDXD_COMPLETE_ABORT ); +idxd_dma_complete_txd (found,IDXD_COMPLETE_ABORT , false); + +/* -* complete_desc() will return desc to allocator and the desc can be -* acquired by a different process and the desc->list can be modified. -* Delete desc from list so the list trasversing does not get corrupted -* by the other process. ++ * completing the descriptor will return desc to allocator and ++ * the desc can be acquired by a different process and the ++ * desc->list can be modified. Delete desc from list so the ++ * list trasversing does not get corrupted by the other process. + */ + list_for_each_entry_safe(d, t, &flist, list) { +list_del_init (&d->list); -complete_desc (d,IDXD_COMPLETE_NORMAL ); ++idxd_dma_complete_txd (d,IDXD_COMPLETE_NORMAL , false); + } } +/* +* ENQCMDS typically fail when the WQ is inactive or busy. On host submission, the driver +* has better control of number of descriptors being submitted to a shared wq by limiting +* the number of driver allocated descriptors to the wq size. However, when the swq is +* exported to a guest kernel, it may be shared with multiple guest kernels. This means +* the likelihood of getting busy returned on the swq when submitting goes significantly up. +* Having a tunable retry mechanism allows the driver to keep trying for a bit before giving +* up. The sysfs knob can be tuned by the system administrator. +*/ +int idxd_enqcmds (struct idxd_wq *wq,void __iomem *portal,const void *desc) + { +int rc, retries =0 ; + +do { + rc =enqcmds (portal, desc); +if (rc ==0 ) +break ; +cpu_relax (); + }while (retries++ < wq->enqcmds_retries); + +return rc; + } +int idxd_submit_desc (struct idxd_wq *wq,struct idxd_desc *desc) {struct idxd_device *idxd = wq->idxd;
Quoted 31 lines · On Wed, Dec 15, 2021 at 10:53 AM <[email protected]> wrote:
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/idxd/submit.cbetween commit:
8affd8a4b5ce3("dmaengine: idxd: fix missed completion on abort path")from the dmaengine-fixes tree and commit:
5d78abb6fbc97("dmaengine: idxd: rework descriptor free path on failure")from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/dma/idxd/submit.c +1
-1@@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idxspin_unlock (&ie->list_lock);if (found) -complete_desc (found,IDXD_COMPLETE_ABORT ); +idxd_dma_complete_txd (found,IDXD_COMPLETE_ABORT , false);
drivers/dma/idxd/submit.c
Quoted 10 lines
drivers/dma/idxd/submit.c +4
-4+ +/* -* complete_desc() will return desc to allocator and the desc can be -* acquired by a different process and the desc->list can be modified. -* Delete desc from list so the list trasversing does not get corrupted -* by the other process. ++ * completing the descriptor will return desc to allocator and ++ * the desc can be acquired by a different process and the ++ * desc->list can be modified. Delete desc from list so the ++ * list trasversing does not get corrupted by the other process.
traversing
Quoted 5 lines
+ */
+list_for_each_entry_safe(d, t, &flist, list){+ list_del_init(&d->list); - complete_desc(d, IDXD_COMPLETE_NORMAL); ++ idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
Is "false" correct here?
Quoted 2 lines
+ }
}
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Jiang, Dave
reviewerQuoted 49 lines · Geert Uytterhoeven
Quoted 31 lines · On Wed, Dec 15, 2021 at 10:53 AM <[email protected]> wrote:
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/idxd/submit.cbetween commit:
8affd8a4b5ce3("dmaengine: idxd: fix missed completion on abort path")from the dmaengine-fixes tree and commit:
5d78abb6fbc97("dmaengine: idxd: rework descriptor free path on failure")from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/dma/idxd/submit.c +1
-1@@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idxspin_unlock (&ie->list_lock);if (found) -complete_desc (found,IDXD_COMPLETE_ABORT ); +idxd_dma_complete_txd (found,IDXD_COMPLETE_ABORT , false);drivers/dma/idxd/submit.c
Quoted 10 lines
drivers/dma/idxd/submit.c +6
-4+ +/* -* complete_desc() will return desc to allocator and the desc can be -* acquired by a different process and the desc->list can be modified. -* Delete desc from list so the list trasversing does not get corrupted -* by the other process. ++ * completing the descriptor will return desc to allocator and ++ * the desc can be acquired by a different process and the ++ * desc->list can be modified. Delete desc from list so the ++ * list trasversing does not get corrupted by the other process. traversing
Quoted 7 lines
drivers/dma/idxd/submit.c
Quoted 5 lines
drivers/dma/idxd/submit.c +4
-1+*/ +list_for_each_entry_safe (d, t, &flist, list) { +list_del_init (&d->list); -complete_desc (d,IDXD_COMPLETE_NORMAL ); ++idxd_dma_complete_txd (d,IDXD_COMPLETE_NORMAL , false);Is "false" correct here?
Yes that’s correct. Thanks.
Quoted 14 lines
Quoted 3 lines
+ }
}Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Dave Jiang
reviewerQuoted 44 lines · Geert Uytterhoeven
Quoted 31 lines · On Wed, Dec 15, 2021 at 10:53 AM <[email protected]> wrote:
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/idxd/submit.cbetween commit:
8affd8a4b5ce3("dmaengine: idxd: fix missed completion on abort path")from the dmaengine-fixes tree and commit:
5d78abb6fbc97("dmaengine: idxd: rework descriptor free path on failure")from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
drivers/dma/idxd/submit.c +1
-1@@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idxspin_unlock (&ie->list_lock);if (found) -complete_desc (found,IDXD_COMPLETE_ABORT ); +idxd_dma_complete_txd (found,IDXD_COMPLETE_ABORT , false);drivers/dma/idxd/submit.c
Quoted 10 lines
drivers/dma/idxd/submit.c +4
-4+ +/* -* complete_desc() will return desc to allocator and the desc can be -* acquired by a different process and the desc->list can be modified. -* Delete desc from list so the list trasversing does not get corrupted -* by the other process. ++ * completing the descriptor will return desc to allocator and ++ * the desc can be acquired by a different process and the ++ * desc->list can be modified. Delete desc from list so the ++ * list trasversing does not get corrupted by the other process. traversing
Quoted 6 lines
Quoted 5 lines
+ */
+list_for_each_entry_safe(d, t, &flist, list){
+list_del_init(&d->list);
-complete_desc(d, IDXD_COMPLETE_NORMAL);
++idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);Is "false" correct here?
Hi Geert, took a closer look today. I believe it should be 'true' here since this is a normal completion that needs to release the descriptors. Sorry about the previous incorrect response.
Quoted 13 lines
Quoted 3 lines
+ }
}Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Dave,
Quoted 11 lines · On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <[email protected]> wrote:
Quoted 7 lines
Quoted 6 lines
+ */
+list_for_each_entry_safe(d, t, &flist, list){
+list_del_init(&d->list);
-complete_desc(d, IDXD_COMPLETE_NORMAL);
++idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);Is "false" correct here?
Hi Geert, took a closer look today. I believe it should be 'true' here since this is a normal completion that needs to release the descriptors. Sorry about the previous incorrect response.
I have updated my resolution from today. Thanks for the feedback.
Signature · 2 lines
Cheers, Stephen Rothwell
Vinod Koul
maintainerQuoted 9 lines · Stephen Rothwell
Hi Dave,
Quoted 6 lines · On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines
+ */
+list_for_each_entry_safe(d, t, &flist, list){
+list_del_init(&d->list);
-complete_desc(d, IDXD_COMPLETE_NORMAL);
++idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Is "false" correct here?
Hi Geert, took a closer look today. I believe it should be 'true' here since this is a normal completion that needs to release the descriptors. Sorry about the previous incorrect response.
I have updated my resolution from today. Thanks for the feedback.
I have merged fixes into next as well, so this should not be required tomorrow.
Dave pls test..
Signature · 1 line
~Vinod
Dave Jiang
reviewerQuoted 10 lines · Vinod Koul
Quoted 9 lines · Stephen Rothwell
Hi Dave,
Quoted 6 lines · On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <[email protected]> wrote:
Quoted 6 lines
Quoted 5 lines
+ */
+list_for_each_entry_safe(d, t, &flist, list){
+list_del_init(&d->list);
-complete_desc(d, IDXD_COMPLETE_NORMAL);
++idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);Is "false" correct here?
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Hi Geert, took a closer look today. I believe it should be 'true' here since this is a normal completion that needs to release the descriptors. Sorry about the previous incorrect response.
I have updated my resolution from today. Thanks for the feedback.
I have merged fixes into next as well, so this should not be required tomorrow.
Dave pls test..
Tested. Looks good. Thanks.