* [PATCH v2 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM
@ 2017-08-15 19:20 Sagi Grimberg
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 19:20 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.
Changes from v1:
- fixed spelling glitch
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 v2 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2017-08-15 19:20 ` Sagi Grimberg
2017-08-15 19:20 ` [PATCH v2 2/2] iwcm: Don't allocate iwcm " Sagi Grimberg
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 19:20 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise
create_workqueue always creates the workqueue with WQ_MEM_RECLAIM
and silences a flush dependency 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>
Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@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 v2 2/2] iwcm: Don't allocate iwcm workqueue with WQ_MEM_RECLAIM
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 19:20 ` [PATCH v2 1/2] cm: Don't allocate ib_cm workqueue " Sagi Grimberg
@ 2017-08-15 19:20 ` Sagi Grimberg
2017-08-15 20:53 ` [PATCH v2 0/2] Don't allocate ib/iw cm workqueues " Parav Pandit
2017-08-18 14:48 ` Doug Ledford
3 siblings, 0 replies; 6+ messages in thread
From: Sagi Grimberg @ 2017-08-15 19:20 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>
Reviewed-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 v2 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 19:20 ` [PATCH v2 1/2] cm: Don't allocate ib_cm workqueue " Sagi Grimberg
2017-08-15 19:20 ` [PATCH v2 2/2] iwcm: Don't allocate iwcm " Sagi Grimberg
@ 2017-08-15 20:53 ` Parav Pandit
[not found] ` <VI1PR0502MB300859CC289623BEA5D2DF9AD18D0-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-08-18 14:48 ` Doug Ledford
3 siblings, 1 reply; 6+ messages in thread
From: Parav Pandit @ 2017-08-15 20:53 UTC (permalink / raw)
To: Sagi Grimberg, Doug Ledford,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Steve Wise
Hi Sagi,
> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Sagi Grimberg
> Sent: Tuesday, August 15, 2017 2:21 PM
> To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Subject: [PATCH v2 0/2] Don't allocate ib/iw cm workqueues with
> WQ_MEM_RECLAIM
>
> 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
Are you saying a work executed on a WQ which is created with WQ_MEM_RECLAIM, cannot allocate memory?
Did I misread 'such workqueues cannot allocate memory'?
> workqueues.
>
--
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 v2 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM
[not found] ` <VI1PR0502MB300859CC289623BEA5D2DF9AD18D0-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2017-08-15 20:56 ` Parav Pandit
0 siblings, 0 replies; 6+ messages in thread
From: Parav Pandit @ 2017-08-15 20:56 UTC (permalink / raw)
To: Parav Pandit, Sagi Grimberg, Doug Ledford,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Steve Wise
Never mind. I read the other thread.
> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Parav Pandit
> Sent: Tuesday, August 15, 2017 3:53 PM
> To: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>; Doug Ledford
> <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> Subject: RE: [PATCH v2 0/2] Don't allocate ib/iw cm workqueues with
> WQ_MEM_RECLAIM
>
> Hi Sagi,
>
> > -----Original Message-----
> > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Sagi Grimberg
> > Sent: Tuesday, August 15, 2017 2:21 PM
> > To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Cc: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> > Subject: [PATCH v2 0/2] Don't allocate ib/iw cm workqueues with
> > WQ_MEM_RECLAIM
> >
> > 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
> Are you saying a work executed on a WQ which is created with
> WQ_MEM_RECLAIM, cannot allocate memory?
> Did I misread 'such workqueues cannot allocate memory'?
>
> > workqueues.
> >
> --
> 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
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.ke
> rnel.org%2Fmajordomo-
> info.html&data=02%7C01%7Cparav%40mellanox.com%7C93927b0ff2eb41195a
> 2208d4e41fa791%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636
> 384272020352896&sdata=%2FgoMTFzzT1h9rc2WE04mHfU9RRiO415k3eylvl6M
> OfI%3D&reserved=0
--
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 v2 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
` (2 preceding siblings ...)
2017-08-15 20:53 ` [PATCH v2 0/2] Don't allocate ib/iw cm workqueues " Parav Pandit
@ 2017-08-18 14:48 ` Doug Ledford
3 siblings, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2017-08-18 14:48 UTC (permalink / raw)
To: Sagi Grimberg, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Steve Wise
On Tue, 2017-08-15 at 22:20 +0300, Sagi Grimberg wrote:
> 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.
>
> Changes from v1:
> - fixed spelling glitch
>
> 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(-)
Thanks Sagi, series applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
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
end of thread, other threads:[~2017-08-18 14:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 19:20 [PATCH v2 0/2] Don't allocate ib/iw cm workqueues with WQ_MEM_RECLAIM Sagi Grimberg
[not found] ` <1502824838-21745-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-08-15 19:20 ` [PATCH v2 1/2] cm: Don't allocate ib_cm workqueue " Sagi Grimberg
2017-08-15 19:20 ` [PATCH v2 2/2] iwcm: Don't allocate iwcm " Sagi Grimberg
2017-08-15 20:53 ` [PATCH v2 0/2] Don't allocate ib/iw cm workqueues " Parav Pandit
[not found] ` <VI1PR0502MB300859CC289623BEA5D2DF9AD18D0-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-08-15 20:56 ` Parav Pandit
2017-08-18 14:48 ` Doug Ledford
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.