lkml.org 
[lkml]   [2023]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 2/2] tools/memory-model: Provide exact SRCU semantics
On Thu, Jan 26, 2023 at 09:35:07AM -0800, Paul E. McKenney wrote:
> On Thu, Jan 26, 2023 at 12:30:14PM +0100, Jonas Oberhauser wrote:
> > I don't think they're necessarily implemented in a compatible way, so
> >
> > r = srcu_lock(s);
> > srcu_up(s,r);
> >
> > might not actually work, but would currently be ok'ed by LKMM.
>
> In kernels built with CONFIG_PROVE_LOCKING=y (AKA built with lockdep
> enabled), lockdep would complain about having an srcu_read_lock() with
> no matching srcu_read_unlock(). Kernels built without lockdep (that is,
> kernels actually used in production) would be happy with this.
>
> So as Jonas suspects, this should be classified as not actually working.

Lockdep complaints don't actually stop things from working (unless you
want them to). They're just warnings, right?

Alan

\
 
 \ /
  Last update: 2023-03-26 23:57    [W:0.038 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site