linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Silencing false lockdep warning related to seq lock
@ 2021-05-14 14:52 Joel Fernandes
  2021-05-17  4:21 ` Boqun Feng
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Fernandes @ 2021-05-14 14:52 UTC (permalink / raw)
  To: Boqun Feng
  Cc: Joel Fernandes (Google),
	Peter Zijlstra, Paul E. McKenney, LKML, Laurent Dufour,
	Suren Baghdasaryan

Hi Boqun,
You might have worked on such issues so I thought you're a good person to ask.

After apply Laurent's SPF patchset [1] , we're facing a large number
of (seemingly false positive) lockdep reports which are related to
circular dependencies with seq locks.

 lock(A); write_seqcount(B)
  vs.
write_seqcount(B); lock(A)

This cannot deadlock obviously. My current strategy which I hate is to
make it a raw seqcount write which bypasses lockdep. That's horrible
for obvious reasons. Do you have any tricks/patches up your sleeve to
silence these?

I suppose we still want to catch lockdep issues of the form (which
peterz chatted to me about):

 lock(A); write_seqcount(B)
  vs.
read_seqcount(B); lock(A)

which seems like it can deadlock.

I would rather make lockdep useful to catch these and not miss out on
them. Let me know what you think?

Cheers,
-Joel

[1] https://lkml.org/lkml/2019/4/16/615

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-19  4:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 14:52 Silencing false lockdep warning related to seq lock Joel Fernandes
2021-05-17  4:21 ` Boqun Feng
2021-05-18  1:52   ` Joel Fernandes
2021-05-18  2:24     ` Boqun Feng
2021-05-18 15:53       ` Joel Fernandes
2021-05-19  4:50         ` Boqun Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).