Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models
Developing concurrent software is challenging, especially if it has to run on modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or RISC-V. For the sake of performance, WMMs allow hardware and compilers to aggressively reorder memory accesses. To guarantee correctness, develop...
Gespeichert in:
Hauptverfasser: | , , , , , , |
---|---|
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
container_end_page | |
---|---|
container_issue | |
container_start_page | |
container_title | |
container_volume | |
creator | Paolillo, Antonio Ponce-de-León, Hernán Haas, Thomas Behrens, Diogo Chehab, Rafael Fu, Ming Meyer, Roland |
description | Developing concurrent software is challenging, especially if it has to run on
modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or
RISC-V. For the sake of performance, WMMs allow hardware and compilers to
aggressively reorder memory accesses. To guarantee correctness, developers have
to carefully place memory barriers in the code to enforce ordering among
critical memory operations.
While WMM architectures are growing in popularity, identifying the necessary
and sufficient barriers of complex synchronization primitives is notoriously
difficult. Unfortunately, publications often consider barriers to be just
implementation details and omit them. In this technical note, we report our
efforts in verifying the correctness of the Compact NUMA-Aware (CNA) lock
algorithm on WMMs. The CNA lock is of special interest because it has been
proposed as a new slowpath for Linux qspinlock, the main spinlock in Linux.
Besides determining a correct and efficient set of barriers for the original
CNA algorithm on WMMs, we investigate the correctness of Linux qspinlock and
the latest Linux CNA patch (v15) on the memory models LKMM, ARMv8, and Power.
Surprisingly, we have found that Linux qspinlock and, consequently, Linux CNA
are incorrect according to LKMM, but are still correct when compiled to ARMv8
or Power. |
doi_str_mv | 10.48550/arxiv.2111.15240 |
format | Article |
fullrecord | <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2111_15240</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2111_15240</sourcerecordid><originalsourceid>FETCH-LOGICAL-a670-dfc297c38f2e87baa6af9ff4db28e76eccf781902ff6237b4799d8e68280d9ef3</originalsourceid><addsrcrecordid>eNotz71OwzAUhmEvDKhwAUz4BhJs58f2GEVQkBK6FBijE_scZLX5kVsB4epRS6dP7_JJD2N3UqS5KQrxAPEnfKVKSpnKQuXimq3fMQZawvjJYfR8Mx_DEH5PWU_DDO7IX9_aKqm-ISJvJrc78GnkHwg73uIwxYW3k8f94YZdEewPeHvZFds-PW7r56TZrF_qqkmg1CLx5JTVLjOk0OgeoASyRLnvlUFdonOkjbRCEZUq032urfUGS6OM8BYpW7H7_9uzpJtjGCAu3UnUnUXZH_iaRiw</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models</title><source>arXiv.org</source><creator>Paolillo, Antonio ; Ponce-de-León, Hernán ; Haas, Thomas ; Behrens, Diogo ; Chehab, Rafael ; Fu, Ming ; Meyer, Roland</creator><creatorcontrib>Paolillo, Antonio ; Ponce-de-León, Hernán ; Haas, Thomas ; Behrens, Diogo ; Chehab, Rafael ; Fu, Ming ; Meyer, Roland</creatorcontrib><description>Developing concurrent software is challenging, especially if it has to run on
modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or
RISC-V. For the sake of performance, WMMs allow hardware and compilers to
aggressively reorder memory accesses. To guarantee correctness, developers have
to carefully place memory barriers in the code to enforce ordering among
critical memory operations.
While WMM architectures are growing in popularity, identifying the necessary
and sufficient barriers of complex synchronization primitives is notoriously
difficult. Unfortunately, publications often consider barriers to be just
implementation details and omit them. In this technical note, we report our
efforts in verifying the correctness of the Compact NUMA-Aware (CNA) lock
algorithm on WMMs. The CNA lock is of special interest because it has been
proposed as a new slowpath for Linux qspinlock, the main spinlock in Linux.
Besides determining a correct and efficient set of barriers for the original
CNA algorithm on WMMs, we investigate the correctness of Linux qspinlock and
the latest Linux CNA patch (v15) on the memory models LKMM, ARMv8, and Power.
Surprisingly, we have found that Linux qspinlock and, consequently, Linux CNA
are incorrect according to LKMM, but are still correct when compiled to ARMv8
or Power.</description><identifier>DOI: 10.48550/arxiv.2111.15240</identifier><language>eng</language><subject>Computer Science - Operating Systems</subject><creationdate>2021-11</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,881</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2111.15240$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2111.15240$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Paolillo, Antonio</creatorcontrib><creatorcontrib>Ponce-de-León, Hernán</creatorcontrib><creatorcontrib>Haas, Thomas</creatorcontrib><creatorcontrib>Behrens, Diogo</creatorcontrib><creatorcontrib>Chehab, Rafael</creatorcontrib><creatorcontrib>Fu, Ming</creatorcontrib><creatorcontrib>Meyer, Roland</creatorcontrib><title>Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models</title><description>Developing concurrent software is challenging, especially if it has to run on
modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or
RISC-V. For the sake of performance, WMMs allow hardware and compilers to
aggressively reorder memory accesses. To guarantee correctness, developers have
to carefully place memory barriers in the code to enforce ordering among
critical memory operations.
While WMM architectures are growing in popularity, identifying the necessary
and sufficient barriers of complex synchronization primitives is notoriously
difficult. Unfortunately, publications often consider barriers to be just
implementation details and omit them. In this technical note, we report our
efforts in verifying the correctness of the Compact NUMA-Aware (CNA) lock
algorithm on WMMs. The CNA lock is of special interest because it has been
proposed as a new slowpath for Linux qspinlock, the main spinlock in Linux.
Besides determining a correct and efficient set of barriers for the original
CNA algorithm on WMMs, we investigate the correctness of Linux qspinlock and
the latest Linux CNA patch (v15) on the memory models LKMM, ARMv8, and Power.
Surprisingly, we have found that Linux qspinlock and, consequently, Linux CNA
are incorrect according to LKMM, but are still correct when compiled to ARMv8
or Power.</description><subject>Computer Science - Operating Systems</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotz71OwzAUhmEvDKhwAUz4BhJs58f2GEVQkBK6FBijE_scZLX5kVsB4epRS6dP7_JJD2N3UqS5KQrxAPEnfKVKSpnKQuXimq3fMQZawvjJYfR8Mx_DEH5PWU_DDO7IX9_aKqm-ISJvJrc78GnkHwg73uIwxYW3k8f94YZdEewPeHvZFds-PW7r56TZrF_qqkmg1CLx5JTVLjOk0OgeoASyRLnvlUFdonOkjbRCEZUq032urfUGS6OM8BYpW7H7_9uzpJtjGCAu3UnUnUXZH_iaRiw</recordid><startdate>20211130</startdate><enddate>20211130</enddate><creator>Paolillo, Antonio</creator><creator>Ponce-de-León, Hernán</creator><creator>Haas, Thomas</creator><creator>Behrens, Diogo</creator><creator>Chehab, Rafael</creator><creator>Fu, Ming</creator><creator>Meyer, Roland</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20211130</creationdate><title>Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models</title><author>Paolillo, Antonio ; Ponce-de-León, Hernán ; Haas, Thomas ; Behrens, Diogo ; Chehab, Rafael ; Fu, Ming ; Meyer, Roland</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a670-dfc297c38f2e87baa6af9ff4db28e76eccf781902ff6237b4799d8e68280d9ef3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Computer Science - Operating Systems</topic><toplevel>online_resources</toplevel><creatorcontrib>Paolillo, Antonio</creatorcontrib><creatorcontrib>Ponce-de-León, Hernán</creatorcontrib><creatorcontrib>Haas, Thomas</creatorcontrib><creatorcontrib>Behrens, Diogo</creatorcontrib><creatorcontrib>Chehab, Rafael</creatorcontrib><creatorcontrib>Fu, Ming</creatorcontrib><creatorcontrib>Meyer, Roland</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Paolillo, Antonio</au><au>Ponce-de-León, Hernán</au><au>Haas, Thomas</au><au>Behrens, Diogo</au><au>Chehab, Rafael</au><au>Fu, Ming</au><au>Meyer, Roland</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models</atitle><date>2021-11-30</date><risdate>2021</risdate><abstract>Developing concurrent software is challenging, especially if it has to run on
modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or
RISC-V. For the sake of performance, WMMs allow hardware and compilers to
aggressively reorder memory accesses. To guarantee correctness, developers have
to carefully place memory barriers in the code to enforce ordering among
critical memory operations.
While WMM architectures are growing in popularity, identifying the necessary
and sufficient barriers of complex synchronization primitives is notoriously
difficult. Unfortunately, publications often consider barriers to be just
implementation details and omit them. In this technical note, we report our
efforts in verifying the correctness of the Compact NUMA-Aware (CNA) lock
algorithm on WMMs. The CNA lock is of special interest because it has been
proposed as a new slowpath for Linux qspinlock, the main spinlock in Linux.
Besides determining a correct and efficient set of barriers for the original
CNA algorithm on WMMs, we investigate the correctness of Linux qspinlock and
the latest Linux CNA patch (v15) on the memory models LKMM, ARMv8, and Power.
Surprisingly, we have found that Linux qspinlock and, consequently, Linux CNA
are incorrect according to LKMM, but are still correct when compiled to ARMv8
or Power.</abstract><doi>10.48550/arxiv.2111.15240</doi><oa>free_for_read</oa></addata></record> |
fulltext | fulltext_linktorsrc |
identifier | DOI: 10.48550/arxiv.2111.15240 |
ispartof | |
issn | |
language | eng |
recordid | cdi_arxiv_primary_2111_15240 |
source | arXiv.org |
subjects | Computer Science - Operating Systems |
title | Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-15T00%3A46%3A11IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Verifying%20and%20Optimizing%20Compact%20NUMA-Aware%20Locks%20on%20Weak%20Memory%20Models&rft.au=Paolillo,%20Antonio&rft.date=2021-11-30&rft_id=info:doi/10.48550/arxiv.2111.15240&rft_dat=%3Carxiv_GOX%3E2111_15240%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true |