linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: BUG: maple_tree: KCSAN: data-race in mas_topiary_replace / mtree_range_walk [EXPERIMENTAL PATCH]
Date: Mon, 2 Oct 2023 12:43:10 -0400	[thread overview]
Message-ID: <20231002164310.bi62wfekacfxb3ve@revolver> (raw)
In-Reply-To: <5a30110b-2457-4638-8779-baa33326f6a6@alu.unizg.hr>

* Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> [231001 17:09]:

...

> 
> They say that one patch speaks more than a thousand words.
> 
> I am just running this little patch that actually silences all of the KCSAN warnings.
> 
> I cannot tell if these reported data races are the actual bugs, but it is possible that
> the Ubuntu 22.04 gcc is doing some funny stuff when optimising. In Prof. McKenney's
> book I've read about the load-tearing and store-tearing. AFAICS, memory barriers should
> prevent load/store reordering, but not the compiler optimisations.
> 
> Please find two versions of the patch attached.
> 
> While mas->index and pivots[offset] in maple_range_walk can change concurrently,
> I am not smart enough to see whether you expect that in your algorithm or is it a potential
> bug triggered by GCC optimisations and aggressive Ryzen 9 7950X parallelism.

None of this is necessary, for sure.

I will have to look at this when I have more time to investigate.  This
will likely not be soon, however.

Thanks,
Liam


  reply	other threads:[~2023-10-02 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21 21:01 BUG: maple_tree: KCSAN: data-race in mas_topiary_replace / mtree_range_walk Mirsad Todorovac
2023-09-22 13:51 ` Liam R. Howlett
2023-09-23  7:26   ` Mirsad Todorovac
2023-09-28 19:59     ` Liam R. Howlett
2023-09-30  7:02       ` Mirsad Todorovac
2023-10-01 21:08       ` BUG: maple_tree: KCSAN: data-race in mas_topiary_replace / mtree_range_walk [EXPERIMENTAL PATCH] Mirsad Todorovac
2023-10-02 16:43         ` Liam R. Howlett [this message]
2023-10-02 19:50           ` Mirsad Todorovac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231002164310.bi62wfekacfxb3ve@revolver \
    --to=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox