Native Linux AIO in Samba4

tridge at samba.org tridge at samba.org
Fri Jan 12 21:47:00 GMT 2007


Volker,

 > I've looked at it today, because I want smbd/notify_fam.c
 > and possibly a future smbd/notify_inode.c to be able to do
 > register a callback in a sane way. If you look at nsswitch/
 > you will find that something very similar is already there.

ok, I see it in nsswitch/.

The key to making it really useful is having a single event context
across the entire process. So if some library call (eg. rpc call)
needs to be done deep in a complex bit of code that while that is
happening other events still get processed.

 > If we really do the while (1) { event_loop_once() } in the
 > first step, I'm not sure.

it might be easier to first replace the current select calls with
something based on event_loop_once(), and only move to a top level
event loop later.

One part that will be tricky is ensuring there is only a single event
context. In Samba3 this is probably most naturally don't with a global
variable pointing at the event context. In Samba4 we either pass the
event context down, or use event_context_find() which relies on the
event context being at the top of the talloc tree.

Cheers, Tridge


More information about the samba-technical mailing list