public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Hazard pointer enabled refcount prototype
@ 2024-10-04 19:52 Mathieu Desnoyers
  2024-10-05  8:43 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Desnoyers @ 2024-10-04 19:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Boqun Feng, paulmck, linux-kernel

Hi Greg,

After our discussion at KR2024, I've created a prototype adding hazard pointer
dereference support to refcount.h:

https://github.com/compudj/linux-dev/commit/234523dc9be90f1bc9221bf2d430c9187ac61528

Branch: https://github.com/compudj/linux-dev/tree/hp-6.11-refcount

It allows dereferencing a pointer to a refcount and incrementing the refcount,
without relying on RCU.

A good candidate for this would be the "usblp" driver which is using a static mutex
for existence guarantees. Introducing a refcount as first field of struct usblp
should do the trick.

I am not entirely sure if this kind of use-case justifies introducing hazard pointers
though, as this can be done just as well with RCU. I'll let you be the judge on this.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

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

end of thread, other threads:[~2024-10-05 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 19:52 Hazard pointer enabled refcount prototype Mathieu Desnoyers
2024-10-05  8:43 ` Greg Kroah-Hartman
2024-10-05 15:01   ` Mathieu Desnoyers

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