[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 01/20] asm-generic/mmiowb: Add generic implementation of mmiowb() tracking
On Mon, Mar 4, 2019 at 2:24 AM Michael Ellerman <> wrote:
> Without wading into the rest of the discussion, this does raise an
> interesting point, ie. what about eg. rwlock's?
> They're basically equivalent to spinlocks, and so could reasonably be
> expected to have the same behaviour.
> But we don't check the io_sync flag in arch_read/write_unlock() etc. and
> both of those use lwsync.

I think technically rwlocks should do the same thing, at least when
they are used for exclusion.

Because of the exclusion argument, we can presubably limit it to just
write_unlock(), although at least in theory I guess you could have
some "one reader does IO, then a writer comes in" situation..

Perhaps more importantly, what about sleeping locks? When they
actually *block*, they get the barrier thanks to the scheduler, but
you can have a nice non-contended sequence that never does that.

I guess the fact that these cases have never even shown up as an issue
means that we could just continue to ignore it.

We could even give that approach some fancy name, and claim it as a
revolutionary new programming paradigm ("ostrich programming" to go
with "agile" and "pair programming").


 \ /
  Last update: 2019-03-05 01:20    [W:0.108 / U:5.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site