mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Canonical ring-buffer code : SMP, single-reader/writer
@ 2010-10-17 21:50 Tom Brown
  0 siblings, 0 replies; only message in thread
From: Tom Brown @ 2010-10-17 21:50 UTC (permalink / raw)
  To: LKML

Does anyone happen to know of any good example code that I could use in 
a driver for a simple single-reader, single-writer, ring buffer, on an 
SMP system?

My own code doesn't use any locks, but I'm concerned that it may be 
flaky. It's running on an 8-core processor, and I'm worried that I may 
be seeing SMP locking issues which I don't understand because the driver 
is on one core, while the user is on another core.

In my case, the producer is the driver, and the consumer is the user. I 
could just lock all the driver writes to the buffer and the driver's 
update of the shared 'last written' pointer, but that seems a really 
poor design.

Thanks -

Tom

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-17 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 21:50 Canonical ring-buffer code : SMP, single-reader/writer Tom Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome