All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM
@ 2017-08-15 16:12 Sagi Grimberg
       [not found] ` <1502813574-6040-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 16:12 UTC (permalink / raw)
  To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise

It's not correct due to the fact that such workqueues cannot allocate
memory in their work execution by definition, which is definitly not
the case for cm workqueues.

Sagi Grimberg (2):
  cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM
  iwcm: Don't allocate iwcm workqueue with WQ_MEM_RECLAIM

 drivers/infiniband/core/cm.c   | 2 +-
 drivers/infiniband/core/iwcm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM
       [not found] ` <1502813574-6040-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2017-08-15 16:12   ` Sagi Grimberg
       [not found]     ` <1502813574-6040-2-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  2017-08-15 16:12   ` [PATCH 2/2] iwcm: Don't allocate iwcm " Sagi Grimberg
  1 sibling, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 16:12 UTC (permalink / raw)
  To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise

create_workqueue always creates the worqeueu with WQ_MEM_RECLAIM
and silences a flush dependancy warn for WQ_LEGACY. Instead, we
want to keep the warn in case the allocator tries to flush the
cm workqueue because its very likely that cm work execution will
yield memory allocations (for example cm connection requests) .

Reported-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
 drivers/infiniband/core/cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 2b4d613a3474..838e3507eadc 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -4201,7 +4201,7 @@ static int __init ib_cm_init(void)
 		goto error1;
 	}
 
-	cm.wq = create_workqueue("ib_cm");
+	cm.wq = alloc_workqueue("ib_cm", 0, 1);
 	if (!cm.wq) {
 		ret = -ENOMEM;
 		goto error2;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] iwcm: Don't allocate iwcm workqueue with WQ_MEM_RECLAIM
       [not found] ` <1502813574-6040-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  2017-08-15 16:12   ` [PATCH 1/2] cm: Don't allocate ib_cm workqueue " Sagi Grimberg
@ 2017-08-15 16:12   ` Sagi Grimberg
       [not found]     ` <1502813574-6040-3-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 16:12 UTC (permalink / raw)
  To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise

Its very likely that iwcm work execution will yield memory
allocations (for example cm connection request).

Reported-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
 drivers/infiniband/core/iwcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 31661b5c1743..ff6d7bc44c1f 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -1181,7 +1181,7 @@ static int __init iw_cm_init(void)
 	if (ret)
 		pr_err("iw_cm: couldn't register netlink callbacks\n");
 
-	iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", WQ_MEM_RECLAIM);
+	iwcm_wq = alloc_ordered_workqueue("iw_cm_wq", 0);
 	if (!iwcm_wq)
 		return -ENOMEM;
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM
       [not found]     ` <1502813574-6040-2-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2017-08-15 17:30       ` Steve Wise
  2017-08-15 18:06         ` Leon Romanovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Wise @ 2017-08-15 17:30 UTC (permalink / raw)
  To: 'Sagi Grimberg', 'Doug Ledford',
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

> create_workqueue always creates the worqeueu with WQ_MEM_RECLAIM

Typo "worqeueu" -> "workqueue"

> and silences a flush dependancy warn for WQ_LEGACY. Instead, we
> want to keep the warn in case the allocator tries to flush the
> cm workqueue because its very likely that cm work execution will
> yield memory allocations (for example cm connection requests) .
> 
> Reported-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>

The change looks good.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 2/2] iwcm: Don't allocate iwcm workqueue with WQ_MEM_RECLAIM
       [not found]     ` <1502813574-6040-3-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2017-08-15 17:30       ` Steve Wise
  0 siblings, 0 replies; 6+ messages in thread
From: Steve Wise @ 2017-08-15 17:30 UTC (permalink / raw)
  To: 'Sagi Grimberg', 'Doug Ledford',
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

> 
> Its very likely that iwcm work execution will yield memory
> allocations (for example cm connection request).
> 
> Reported-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
> ---
>  drivers/infiniband/core/iwcm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM
  2017-08-15 17:30       ` Steve Wise
@ 2017-08-15 18:06         ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-08-15 18:06 UTC (permalink / raw)
  To: Steve Wise
  Cc: 'Sagi Grimberg', 'Doug Ledford',
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

On Tue, Aug 15, 2017 at 12:30:12PM -0500, Steve Wise wrote:
> > create_workqueue always creates the worqeueu with WQ_MEM_RECLAIM
>
> Typo "worqeueu" -> "workqueue"
>
> > and silences a flush dependancy warn for WQ_LEGACY. Instead, we
> > want to keep the warn in case the allocator tries to flush the
> > cm workqueue because its very likely that cm work execution will
> > yield memory allocations (for example cm connection requests) .

And extra space before the last dot.

Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>


> >
> > Reported-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> > Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
>
> The change looks good.
>
> Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-15 18:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 16:12 [PATCH 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM Sagi Grimberg
     [not found] ` <1502813574-6040-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 16:12   ` [PATCH 1/2] cm: Don't allocate ib_cm workqueue " Sagi Grimberg
     [not found]     ` <1502813574-6040-2-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 17:30       ` Steve Wise
2017-08-15 18:06         ` Leon Romanovsky
2017-08-15 16:12   ` [PATCH 2/2] iwcm: Don't allocate iwcm " Sagi Grimberg
     [not found]     ` <1502813574-6040-3-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 17:30       ` Steve Wise

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.