[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whKyWvzg=7_m1o_KLC3zb9FjTBHftc36-5M9X78AxwRXg@mail.gmail.com>
Date: Fri, 2 Jun 2023 16:07:10 -0400
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Jason Wang <jasowang@...hat.com>,
Mike Christie <michael.christie@...cle.com>,
linux@...mhuis.info, nicolas.dichtel@...nd.com, axboe@...nel.dk,
ebiederm@...ssion.com, linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, mst@...hat.com,
sgarzare@...hat.com, stefanha@...hat.com, brauner@...nel.org
Subject: Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
On Fri, Jun 2, 2023 at 1:59 PM Oleg Nesterov <oleg@...hat.com> wrote:
>
> As I said from the very beginning, this code is fine on x86 because
> atomic ops are fully serialised on x86.
Yes. Other architectures require __smp_mb__{before,after}_atomic for
the bit setting ops to actually be memory barriers.
We *should* probably have acquire/release versions of the bit test/set
helpers, but we don't, so they end up being full memory barriers with
those things. Which isn't optimal, but I doubt it matters on most
architectures.
So maybe we'll some day have a "test_bit_acquire()" and a
"set_bit_release()" etc.
Linus
Powered by blists - more mailing lists