[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180628143323.GA32547@nautica>
Date: Thu, 28 Jun 2018 16:33:23 +0200
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: v9fs-developer@...ts.sourceforge.net,
Latchesar Ionkov <lucho@...kov.net>,
Eric Van Hensbergen <ericvh@...il.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Ron Minnich <rminnich@...dia.gov>
Subject: Re: [V9fs-developer] [PATCH 4/6] 9p: Remove an unnecessary memory
barrier
Matthew Wilcox wrote on Thu, Jun 28, 2018:
> How about this?
>
> /*
> * This barrier is needed to make sure any change made to req before
> - * the other thread wakes up will indeed be seen by the waiting side.
> + * the status change is visible to another thread
> */
Yes, that sounds better.
This code is fairly old and I was wondering if the new WRITE_ONCE and
READ_ONCE macros would help but it looks like compile-time barriers only
so I do not think they would be enough...
Documentation/memory-barriers.txt still suggests something similar in
the "SLEEP AND WAKE-UP FUNCTIONS" section so I guess this is fine.
Thanks,
--
Dominique Martinet | Asmadeus
Powered by blists - more mailing lists