 hazard pointer synchronous reclamation1 Basic Hazard Pointer Algorithm read pointer A from SRC remove A from SRC 1 5 4 Safe to use pointer A SRC A hazard pointer is a single-writer multi-reader pointer. set HP to A if SRC == A clear ACCESS If a hazard pointer points to an object before its removal, then the object will not be reclaimed as long as the hazard pointer remains unchanged unchanged. *A Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael Protector Remover / Reclaimer Hazard pointers protect access to objects that may be removed concurrently. SAFE RECLAMATION0 码力 | 31 页 | 856.38 KB | 6 月前3 hazard pointer synchronous reclamation1 Basic Hazard Pointer Algorithm read pointer A from SRC remove A from SRC 1 5 4 Safe to use pointer A SRC A hazard pointer is a single-writer multi-reader pointer. set HP to A if SRC == A clear ACCESS If a hazard pointer points to an object before its removal, then the object will not be reclaimed as long as the hazard pointer remains unchanged unchanged. *A Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael Protector Remover / Reclaimer Hazard pointers protect access to objects that may be removed concurrently. SAFE RECLAMATION0 码力 | 31 页 | 856.38 KB | 6 月前3
 Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!(thankfully) not used by either implementation • Both use the lowest-order bits on the control_block pointer as a lock26 Daniel Anderson -- danielanderson.net Solution #2: The split reference count • Used project on GitHub by Vladislav Tyulbashev Key idea: If we could atomically load the control_block pointer and increment the reference count at the same time, we would avoid the race to zero27 Daniel Anderson Big idea: local_ref_count counts the number of in- flight atomic loads on the currently stored pointer atomic Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!(thankfully) not used by either implementation • Both use the lowest-order bits on the control_block pointer as a lock26 Daniel Anderson -- danielanderson.net Solution #2: The split reference count • Used project on GitHub by Vladislav Tyulbashev Key idea: If we could atomically load the control_block pointer and increment the reference count at the same time, we would avoid the race to zero27 Daniel Anderson Big idea: local_ref_count counts the number of in- flight atomic loads on the currently stored pointer atomic- > control_block28 Daniel Anderson -- danielanderson.net Solution #2: The 0 码力 | 45 页 | 5.12 MB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 10 从稀疏数据结构到量化数据类型实现稀疏的方法有: • hash 哈希(本例中的 unordered_map ) • pointer 指针(本例中的 Block1 ) • dense 稠密(本例中的 Block ) • 他们之间可以相互组合,形成更复杂的稀疏数据结构。 • 下面这个例子中的稀疏数据结构,用这种语言可以表示为 hash().pointer(11).dense(8) 。 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 • 这样就封装好了,通过模板的方式实现了 自定义的稀疏数据结构: • hash().pointer(11).dense(8) 开源的体素处理库: OpenVDB • OpenVDB 的稀疏体积,可以存储符号距 离场 (SDF) ,也可以存储烟雾仿真的结果 等。 • 据张心欣说, OpenVDB 赢得了奥斯卡奖 赢得了奥斯卡奖 。 • 因为他经常用在影视特效中,主要是符号 距离场有时比 mesh 处理起来方便很多。 OpenVDB 的设计:如果用 SNode 来表示 • hash().pointer(5).pointer(4).dense(3) ZENO 中就大量使用了 OpenVDB ,并且以节点的形式提供给用户调用 • github.com/zenustech/zeno ZENO 中的流体仿真,就是基于0 码力 | 102 页 | 9.50 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 10 从稀疏数据结构到量化数据类型实现稀疏的方法有: • hash 哈希(本例中的 unordered_map ) • pointer 指针(本例中的 Block1 ) • dense 稠密(本例中的 Block ) • 他们之间可以相互组合,形成更复杂的稀疏数据结构。 • 下面这个例子中的稀疏数据结构,用这种语言可以表示为 hash().pointer(11).dense(8) 。 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 封装起来,方便多层解耦 • 这样就封装好了,通过模板的方式实现了 自定义的稀疏数据结构: • hash().pointer(11).dense(8) 开源的体素处理库: OpenVDB • OpenVDB 的稀疏体积,可以存储符号距 离场 (SDF) ,也可以存储烟雾仿真的结果 等。 • 据张心欣说, OpenVDB 赢得了奥斯卡奖 赢得了奥斯卡奖 。 • 因为他经常用在影视特效中,主要是符号 距离场有时比 mesh 处理起来方便很多。 OpenVDB 的设计:如果用 SNode 来表示 • hash().pointer(5).pointer(4).dense(3) ZENO 中就大量使用了 OpenVDB ,并且以节点的形式提供给用户调用 • github.com/zenustech/zeno ZENO 中的流体仿真,就是基于0 码力 | 102 页 | 9.50 MB | 1 年前3
 C++20: An (Almost) Complete Overviewaccessing pointer not thread-safe, one thread could be reading pointer, while another thread could be storing new pointer  Make it thread-safe?  Manually use mutex to protect access to smart pointer  Use0 码力 | 85 页 | 512.18 KB | 6 月前3 C++20: An (Almost) Complete Overviewaccessing pointer not thread-safe, one thread could be reading pointer, while another thread could be storing new pointer  Make it thread-safe?  Manually use mutex to protect access to smart pointer  Use0 码力 | 85 页 | 512.18 KB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 性能优化之无分支编程 Branchless Programming而函数指针也是无条件跳转指令: jmp [pointer] 或者说 call [pointer] ,区别在于他的地址 不是写死的,而是动态从内存中读取出来的。 • 普通函数调用的目的地址(或偏移量)写死在指令里, CPU 可以自动预取这个地址的指令。 • 但是函数指针的调用,因为这个目的地址是需要计算得出的,或者说他存在内存中,随时可 能被改写, CPU 难以预判执行到 call [pointer] 的时候这个指针会指向哪里,无法预取。0 码力 | 47 页 | 8.45 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 性能优化之无分支编程 Branchless Programming而函数指针也是无条件跳转指令: jmp [pointer] 或者说 call [pointer] ,区别在于他的地址 不是写死的,而是动态从内存中读取出来的。 • 普通函数调用的目的地址(或偏移量)写死在指令里, CPU 可以自动预取这个地址的指令。 • 但是函数指针的调用,因为这个目的地址是需要计算得出的,或者说他存在内存中,随时可 能被改写, CPU 难以预判执行到 call [pointer] 的时候这个指针会指向哪里,无法预取。0 码力 | 47 页 | 8.45 MB | 1 年前3
 Finding Bugs using Path-Sensitive Static Analysisdereference • more to come.. Flow-sensitive • Coroutine lifetime checks • Most of CppCoreChecks • Pointer safety analysis • Ownership analysis • Lifetime analysis (preview) • more to come…Looking under analysis – Gabor Horvath (online 29th)Thanks!Fourier-Motzkin eliminationResourcesImproved Null Pointer Dereference Detection in Visual Studio 2 022 version 17.0 Preview 4 - C++ Team Blog (microsoft.com)0 码力 | 35 页 | 14.13 MB | 6 月前3 Finding Bugs using Path-Sensitive Static Analysisdereference • more to come.. Flow-sensitive • Coroutine lifetime checks • Most of CppCoreChecks • Pointer safety analysis • Ownership analysis • Lifetime analysis (preview) • more to come…Looking under analysis – Gabor Horvath (online 29th)Thanks!Fourier-Motzkin eliminationResourcesImproved Null Pointer Dereference Detection in Visual Studio 2 022 version 17.0 Preview 4 - C++ Team Blog (microsoft.com)0 码力 | 35 页 | 14.13 MB | 6 月前3
 C++20 STL Features: 1 Year of Development on GitHubNeargye) • P0595R2 is_constant_evaluated() (GH-353, Jennifer Yao – MSVC compiler) • P1006R1 constexpr pointer_to() (GH-397, AdamBucior) • P1023R0 constexpr array Comparisons (GH-599, Weheineman) • P1032R1 spans are implicitly constructible from arrays and vectors • Avoids ownership confusion, accidental pointer arithmetic • span C++20 STL Features: 1 Year of Development on GitHubNeargye) • P0595R2 is_constant_evaluated() (GH-353, Jennifer Yao – MSVC compiler) • P1006R1 constexpr pointer_to() (GH-397, AdamBucior) • P1023R0 constexpr array Comparisons (GH-599, Weheineman) • P1032R1 spans are implicitly constructible from arrays and vectors • Avoids ownership confusion, accidental pointer arithmetic • span-  span - ; span - 🐞 span - • Shallow const, like T* • 0 码力 | 45 页 | 702.09 KB | 6 月前3
 Bringing Existing Code to CUDA Using constexpr and std::pmrbridging the CPU-GPU divide. Managed memory is accessible to both the CPU and GPU using a single pointer. The key is that the system automatically migrates data allocated in Unified Memory between host bridging the CPU-GPU divide. Managed memory is accessible to both the CPU and GPU using a single pointer. The key is that the system automatically migrates data allocated in Unified Memory between host0 码力 | 51 页 | 3.68 MB | 6 月前3 Bringing Existing Code to CUDA Using constexpr and std::pmrbridging the CPU-GPU divide. Managed memory is accessible to both the CPU and GPU using a single pointer. The key is that the system automatically migrates data allocated in Unified Memory between host bridging the CPU-GPU divide. Managed memory is accessible to both the CPU and GPU using a single pointer. The key is that the system automatically migrates data allocated in Unified Memory between host0 码力 | 51 页 | 3.68 MB | 6 月前3
 C++23: An Overview of Almost All New and Updated Features undeclare_reachable()  declare_no_pointers()  undeclare_no_pointers()  get_pointer_safety()  enum pointer_safety  Available since C++11  Not aware of any use of this API  Removed from0 码力 | 105 页 | 759.96 KB | 6 月前3 C++23: An Overview of Almost All New and Updated Features undeclare_reachable()  declare_no_pointers()  undeclare_no_pointers()  get_pointer_safety()  enum pointer_safety  Available since C++11  Not aware of any use of this API  Removed from0 码力 | 105 页 | 759.96 KB | 6 月前3
 绕过conntrack,使用eBPF增强 IPVS优化K8s网络性能conntrack? • Ingress • Move IPVS Netfilter hook from local-in to PREROUTING • The challenges • Skb’s pointer to route is NULL during PREROUTING • No de-fragment is done during PREROUTING IPVS bypass conntrack0 码力 | 24 页 | 1.90 MB | 1 年前3 绕过conntrack,使用eBPF增强 IPVS优化K8s网络性能conntrack? • Ingress • Move IPVS Netfilter hook from local-in to PREROUTING • The challenges • Skb’s pointer to route is NULL during PREROUTING • No de-fragment is done during PREROUTING IPVS bypass conntrack0 码力 | 24 页 | 1.90 MB | 1 年前3
共 16 条
- 1
- 2
相关搜索词
 hazardpointersynchronousreclamationLockFreeAtomicSharedPointersWithoutSplitReferenceCountItCanBeDoneC++高性性能高性能并行编程优化课件1020AnAlmostCompleteOverviewFindingBugsusingPathSensitiveStaticAnalysisSTLFeaturesYearofDevelopmentonGitHubBringingExistingCodetoCUDAUsingconstexprandstdpmr23AllNewUpdated绕过conntrack使用eBPF增强IPVSK8s网络













