<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 11/3/25 12:48, Stephen Hemminger
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20251103104803.30464227@phoenix">
      <pre wrap="" class="moz-quote-pre">On Mon, 3 Nov 2025 18:06:05 +0000
Konstantin Ananyev <a class="moz-txt-link-rfc2396E" href="mailto:konstantin.ananyev@huawei.com"><konstantin.ananyev@huawei.com></a> wrote:

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">
On 11/3/25 11:07, Stephen Hemminger wrote:  
</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">On Mon, 3 Nov 2025 09:12:39 -0600
Wathsala Vithanage <a class="moz-txt-link-rfc2396E" href="mailto:wathsala.vithanage@arm.com"><wathsala.vithanage@arm.com></a> wrote:
 
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">MCS lock is broken, it's just a matter of time it will run into a deadlock.

drivers/dma/cnxk is a user of MCS lock.  
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">I am surprised that a driver would use mcslock.
MCSlock is targeted at case of large number of CPU's with lots of contention.
It will likely be slower than spinlock or ticketlock for the use case of driver.  
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">It appears in |drivers/dma/cnxk/cnxk_dmadev_fp.c|, perhaps the
maintainer can clarify.
  
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">
If MCS lock is really broken, it needs to be fixed anyway.
It might be used by other third-party libs/apps that do use on DPDK.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
100% agree it must be fixed.
It would be good to have test or static analysis tool that could validate all the lock types.
<span style="white-space: normal"> </span></pre>
    </blockquote>
    Looked at seqlock; it seems correct.<br>
    <p>Herd7 has been useful, but it's not a static analysis tool. It
      requires identifying a trouble<br>
      spot manually and then writing a litmus test to test the
      hypothesis.<br>
      <br>
    </p>
  </body>
</html>