* [PATCH V3 0/2] Add support for enhanced atomic operations
@ 2010-03-10 15:57 Vladimir Sokolovsky
2010-03-11 17:29 ` Håkon Bugge
0 siblings, 1 reply; 10+ messages in thread
From: Vladimir Sokolovsky @ 2010-03-10 15:57 UTC (permalink / raw)
To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hi Roland,
This patchset adds support for the following enhanced atomic
operations:
- Masked atomic compare and swap
- Masked atomic fetch and add
These operations enable using a smaller amount of memory when using
multiple locks by using portions of a 64 bit value in an atomic
operation.
For some applications the memory savings are very significant. One
example is fine grain lock implementations for huge data sets. In
other cases, the benefit is the ability to update multiple fields with
a single io operation.
Vladimir Sokolovsky(2):
IB/core: Add support for enhanced atomic operations
mlx4/IB: Add support for enhanced atomic operations
changes from V2:
- patch #1:
Updated description
Renamed:
IB_WR_ATOMIC_MASKED_CMP_AND_SWP -> IB_WR_MASKED_ATOMIC_CMP_AND_SWP
IB_WR_ATOMIC_MASKED_FETCH_AND_ADD -> IB_WR_MASKED_ATOMIC_FETCH_AND_ADD
In the ib_send_wr struct the new fields added before the rkey field
- patch #2:
Set IB_DEVICE_MASKED_ATOMIC flag with other flags that get set for
all devices
Regards,
Vladimir
--
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] 10+ messages in thread* Re: [PATCH V3 0/2] Add support for enhanced atomic operations 2010-03-10 15:57 [PATCH V3 0/2] Add support for enhanced atomic operations Vladimir Sokolovsky @ 2010-03-11 17:29 ` Håkon Bugge [not found] ` <A27E2E88-63A0-45EE-9A70-F95B2A0C25AD-U0mLk4xYmo8@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Håkon Bugge @ 2010-03-11 17:29 UTC (permalink / raw) To: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb Cc: rdreier-FYB4Gu1CFyUAvxtiuMwx3w, linux-rdma-u79uwXL29TY76Z2rM5mHXA Hi Vlad, Did you consider my input in http://www.mail-archive.com/linux-rdma@vger.kernel.org/msg02803.html wrt. to these enhancements? Thanks, Håkon On Mar 10, 2010, at 16:57 , Vladimir Sokolovsky wrote: > Hi Roland, > > This patchset adds support for the following enhanced atomic > operations: > - Masked atomic compare and swap > - Masked atomic fetch and add > > These operations enable using a smaller amount of memory when using > multiple locks by using portions of a 64 bit value in an atomic > operation. > For some applications the memory savings are very significant. One > example is fine grain lock implementations for huge data sets. In > other cases, the benefit is the ability to update multiple fields with > a single io operation. > > Vladimir Sokolovsky(2): > IB/core: Add support for enhanced atomic operations > mlx4/IB: Add support for enhanced atomic operations > > changes from V2: > - patch #1: > Updated description > Renamed: > IB_WR_ATOMIC_MASKED_CMP_AND_SWP -> IB_WR_MASKED_ATOMIC_CMP_AND_SWP > IB_WR_ATOMIC_MASKED_FETCH_AND_ADD -> IB_WR_MASKED_ATOMIC_FETCH_AND_ADD > In the ib_send_wr struct the new fields added before the rkey field > > - patch #2: > Set IB_DEVICE_MASKED_ATOMIC flag with other flags that get set for > all devices > > Regards, > Vladimir > -- > 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 Håkon Bugge Haakon.bugge-U0mLk4xYmo8@public.gmane.org +47 924 84 514 -- 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] 10+ messages in thread
[parent not found: <A27E2E88-63A0-45EE-9A70-F95B2A0C25AD-U0mLk4xYmo8@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <A27E2E88-63A0-45EE-9A70-F95B2A0C25AD-U0mLk4xYmo8@public.gmane.org> @ 2010-03-11 18:59 ` Roland Dreier [not found] ` <adaaaueelby.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> 2010-03-15 7:25 ` Vladimir Sokolovsky 1 sibling, 1 reply; 10+ messages in thread From: Roland Dreier @ 2010-03-11 18:59 UTC (permalink / raw) To: Håkon Bugge Cc: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, linux-rdma-u79uwXL29TY76Z2rM5mHXA > Did you consider my input in http://www.mail-archive.com/linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg02803.html wrt. to these enhancements? I think we can worry about that if/when an HCA comes along that supports global atomics for ordinary atomics but not enhanced atomics. Although perhaps it would be cleaner to change the atomic_cap enum to: /* * IB_ATOMIC_NONE: no atomic capability * IB_ATOMIC_HCA: all ops are atomic within HCA * IB_ATOMIC_GLOB: standard ops atomic with respect to all memory ops; masked ops atomic within HCA * IB_ATOMIC_GLOB_MASKED: all ops atomic with respect to all * memory ops */ enum ib_atomic_cap { IB_ATOMIC_NONE, IB_ATOMIC_HCA, IB_ATOMIC_GLOB, IB_ATOMIC_GLOB_MASKED }; (with better wording for the comments) Thoughts? - R. -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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] 10+ messages in thread
[parent not found: <adaaaueelby.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <adaaaueelby.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> @ 2010-03-12 9:21 ` Håkon Bugge [not found] ` <BA082DF0-B3C6-4405-B480-F69B0193BF17-UdXhSnd/wVw@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Håkon Bugge @ 2010-03-12 9:21 UTC (permalink / raw) To: Roland Dreier Cc: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, linux-rdma-u79uwXL29TY76Z2rM5mHXA On Mar 11, 2010, at 19:59 , Roland Dreier wrote: > I think we can worry about that if/when an HCA comes along that supports > global atomics for ordinary atomics but not enhanced atomics. With the proposed patches in place, how do you know if masked atomics are implemented or not? Guess apps need to know this information already on todays HCAs. > Although perhaps it would be cleaner to change the atomic_cap enum to: > > /* > * IB_ATOMIC_NONE: no atomic capability > * IB_ATOMIC_HCA: all ops are atomic within HCA But IB_ATOMIC_HCA does not tell you if the masked ones are supported or not. > * IB_ATOMIC_GLOB: standard ops atomic with respect to all > memory ops; masked ops atomic within HCA What if an HCA supports standards ops with respect to all memory ops, but the HCA does not support masked atomics? Hence, I think it would be cleaner if a new capability, masked_atomic_cap, were introduced, using the original definitions (NONE, HCA, GLOB). Thanks, Håkon -- 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] 10+ messages in thread
[parent not found: <BA082DF0-B3C6-4405-B480-F69B0193BF17-UdXhSnd/wVw@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <BA082DF0-B3C6-4405-B480-F69B0193BF17-UdXhSnd/wVw@public.gmane.org> @ 2010-03-12 15:53 ` Roland Dreier [not found] ` <adavdd1a64g.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Roland Dreier @ 2010-03-12 15:53 UTC (permalink / raw) To: Håkon Bugge Cc: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, linux-rdma-u79uwXL29TY76Z2rM5mHXA > With the proposed patches in place, how do you know if masked atomics > are implemented or not? Guess apps need to know this information > already on todays HCAs. >From the patch: > @@ -105,6 +105,7 @@ enum ib_device_cap_flags { > IB_DEVICE_UD_TSO = (1<<19), > IB_DEVICE_MEM_MGT_EXTENSIONS = (1<<21), > IB_DEVICE_BLOCK_MULTICAST_LOOPBACK = (1<<22), > + IB_DEVICE_MASKED_ATOMIC = (1<<23), > }; > Hence, I think it would be cleaner if a new capability, > masked_atomic_cap, were introduced, using the original definitions > (NONE, HCA, GLOB). Actually that does seem more orthogonal to me. -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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] 10+ messages in thread
[parent not found: <adavdd1a64g.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <adavdd1a64g.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> @ 2010-03-16 23:49 ` Roland Dreier [not found] ` <adaeijj96a6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Roland Dreier @ 2010-03-16 23:49 UTC (permalink / raw) To: Håkon Bugge Cc: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, linux-rdma-u79uwXL29TY76Z2rM5mHXA > Hence, I think it would be cleaner if a new capability, > masked_atomic_cap, were introduced, using the original definitions > (NONE, HCA, GLOB). Vlad, what do you think about that? The more I think about it, the cleaner this seems to me. And it doesn't even consume a device capability flag bit, which is a nice bonus. -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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] 10+ messages in thread
[parent not found: <adaeijj96a6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <adaeijj96a6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org> @ 2010-03-17 15:32 ` Vladimir Sokolovsky [not found] ` <4BA0F623.1050606-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Vladimir Sokolovsky @ 2010-03-17 15:32 UTC (permalink / raw) To: Roland Dreier; +Cc: Håkon Bugge, linux-rdma-u79uwXL29TY76Z2rM5mHXA Roland Dreier wrote: > > Hence, I think it would be cleaner if a new capability, > > masked_atomic_cap, were introduced, using the original definitions > > (NONE, HCA, GLOB). > > Vlad, what do you think about that? The more I think about it, the > cleaner this seems to me. And it doesn't even consume a device > capability flag bit, which is a nice bonus. Hi Roland, Do you propose to use IB_ATOMIC_GLOB instead of IB_ATOMIC_HCA while setting atomic capability in the code below? props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ? IB_ATOMIC_HCA : IB_ATOMIC_NONE; Or add IB_MASKED_ATOMIC to ib_atomic_cap enum and use this one instead of IB_ATOMIC_HCA? All this, of course, comes to replace setting IB_DEVICE_MASKED_ATOMIC for device capability. Thanks, Vladimir -- 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] 10+ messages in thread
[parent not found: <4BA0F623.1050606-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <4BA0F623.1050606-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2010-04-12 9:44 ` Vladimir Sokolovsky [not found] ` <4BC2EB7F.20804-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Vladimir Sokolovsky @ 2010-04-12 9:44 UTC (permalink / raw) To: Roland Dreier; +Cc: Håkon Bugge, linux-rdma-u79uwXL29TY76Z2rM5mHXA Vladimir Sokolovsky wrote: > Roland Dreier wrote: >> > Hence, I think it would be cleaner if a new capability, >> > masked_atomic_cap, were introduced, using the original definitions >> > (NONE, HCA, GLOB). >> >> Vlad, what do you think about that? The more I think about it, the >> cleaner this seems to me. And it doesn't even consume a device >> capability flag bit, which is a nice bonus. > > Hi Roland, > Do you propose to use IB_ATOMIC_GLOB instead of IB_ATOMIC_HCA while setting > atomic capability in the code below? > > props->atomic_cap = dev->dev->caps.flags & > MLX4_DEV_CAP_FLAG_ATOMIC ? > IB_ATOMIC_HCA : IB_ATOMIC_NONE; > > Or add IB_MASKED_ATOMIC to ib_atomic_cap enum and use this one instead > of IB_ATOMIC_HCA? > > All this, of course, comes to replace setting IB_DEVICE_MASKED_ATOMIC > for device capability. > > Thanks, > Vladimir > > Hi Roland, Can you comment? Thanks, Vladimir -- 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] 10+ messages in thread
[parent not found: <4BC2EB7F.20804-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <4BC2EB7F.20804-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2010-04-13 17:43 ` Roland Dreier 0 siblings, 0 replies; 10+ messages in thread From: Roland Dreier @ 2010-04-13 17:43 UTC (permalink / raw) To: Vladimir Sokolovsky; +Cc: Håkon Bugge, linux-rdma-u79uwXL29TY76Z2rM5mHXA > Do you propose to use IB_ATOMIC_GLOB instead of IB_ATOMIC_HCA while setting > atomic capability in the code below? > > props->atomic_cap = dev->dev->caps.flags & > MLX4_DEV_CAP_FLAG_ATOMIC ? > IB_ATOMIC_HCA : IB_ATOMIC_NONE; > > Or add IB_MASKED_ATOMIC to ib_atomic_cap enum and use this one > instead of IB_ATOMIC_HCA? > > All this, of course, comes to replace setting > IB_DEVICE_MASKED_ATOMIC for device capability. Sorry, missed this reply first time around I guess. Anyway, no I don't think we should use ATOMIC_GLOB unless an HCA truly provides global atomic ops; not possible without PCIe 3.0 atomic support I think. But as I said, I think the original suggestion: > > Hence, I think it would be cleaner if a new capability, > > masked_atomic_cap, were introduced, using the original definitions > > (NONE, HCA, GLOB). makes sense, ie create a new props->masked_atomic_cap and set it to NONE, HCA or GLOB as appropriate (ie NONE for everyone except mlx4, and HCA for mlx4). -- Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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] 10+ messages in thread
* Re: [PATCH V3 0/2] Add support for enhanced atomic operations [not found] ` <A27E2E88-63A0-45EE-9A70-F95B2A0C25AD-U0mLk4xYmo8@public.gmane.org> 2010-03-11 18:59 ` Roland Dreier @ 2010-03-15 7:25 ` Vladimir Sokolovsky 1 sibling, 0 replies; 10+ messages in thread From: Vladimir Sokolovsky @ 2010-03-15 7:25 UTC (permalink / raw) To: Håkon Bugge Cc: rdreier-FYB4Gu1CFyUAvxtiuMwx3w, linux-rdma-u79uwXL29TY76Z2rM5mHXA Håkon Bugge wrote: > Hi Vlad, > > Did you consider my input in http://www.mail-archive.com/linux-rdma@vger.kernel.org/msg02803.html wrt. to these enhancements? > > > > Thanks, Håkon > Hi Håkon, ConnectX devices do not support, currently, PCIe atomic operations. Regards, Vladimir > On Mar 10, 2010, at 16:57 , Vladimir Sokolovsky wrote: > >> Hi Roland, >> >> This patchset adds support for the following enhanced atomic >> operations: >> - Masked atomic compare and swap >> - Masked atomic fetch and add >> >> These operations enable using a smaller amount of memory when using >> multiple locks by using portions of a 64 bit value in an atomic >> operation. >> For some applications the memory savings are very significant. One >> example is fine grain lock implementations for huge data sets. In >> other cases, the benefit is the ability to update multiple fields with >> a single io operation. >> >> Vladimir Sokolovsky(2): >> IB/core: Add support for enhanced atomic operations >> mlx4/IB: Add support for enhanced atomic operations >> >> changes from V2: >> - patch #1: >> Updated description >> Renamed: >> IB_WR_ATOMIC_MASKED_CMP_AND_SWP -> IB_WR_MASKED_ATOMIC_CMP_AND_SWP >> IB_WR_ATOMIC_MASKED_FETCH_AND_ADD -> IB_WR_MASKED_ATOMIC_FETCH_AND_ADD >> In the ib_send_wr struct the new fields added before the rkey field >> >> - patch #2: >> Set IB_DEVICE_MASKED_ATOMIC flag with other flags that get set for >> all devices >> >> Regards, >> Vladimir >> -- >> 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 > > Håkon Bugge > Haakon.bugge-U0mLk4xYmo8@public.gmane.org > +47 924 84 514 > > > > -- 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] 10+ messages in thread
end of thread, other threads:[~2010-04-13 17:43 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 15:57 [PATCH V3 0/2] Add support for enhanced atomic operations Vladimir Sokolovsky
2010-03-11 17:29 ` Håkon Bugge
[not found] ` <A27E2E88-63A0-45EE-9A70-F95B2A0C25AD-U0mLk4xYmo8@public.gmane.org>
2010-03-11 18:59 ` Roland Dreier
[not found] ` <adaaaueelby.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-03-12 9:21 ` Håkon Bugge
[not found] ` <BA082DF0-B3C6-4405-B480-F69B0193BF17-UdXhSnd/wVw@public.gmane.org>
2010-03-12 15:53 ` Roland Dreier
[not found] ` <adavdd1a64g.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-03-16 23:49 ` Roland Dreier
[not found] ` <adaeijj96a6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-03-17 15:32 ` Vladimir Sokolovsky
[not found] ` <4BA0F623.1050606-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-04-12 9:44 ` Vladimir Sokolovsky
[not found] ` <4BC2EB7F.20804-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-04-13 17:43 ` Roland Dreier
2010-03-15 7:25 ` Vladimir Sokolovsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox