EXPERIMENTAL: tevent_kqueue support

Stefan (metze) Metzmacher metze at samba.org
Fri Mar 1 12:29:19 MST 2013


Am 01.03.2013 20:25, schrieb Jeremy Allison:
> On Fri, Mar 01, 2013 at 08:13:31PM +0100, Stefan (metze) Metzmacher wrote:
>> tevent_common_add_timer() and noticed much later that
>> source3/lib/events.c also uses it but without calling
>> tevent_common_loop_timer_delay(). Because of this
>> ev->last_zero_timer wasn't updated after running a timer event.
>>
>> Because released versions of Samba (4.0.0 - 4.0.3) could end up
>> building against a system libtevent, but source3/lib/events.c
>> used lib/tevent/tevent_internal.h, it's not possible to
>> add this new behavior to tevent_common_add_timer(),
>> that's why I added tevent_common_add_timer_v2() for usage
>> in the select, poll and epoll backends. I also added
>> last_zero_timer as the last element of struct tevent_context
>> in order to avoid problems, when source3/lib/events.c may
>> use the wrong definition of struct tevent_context.
>>
>> The final goal should be to avoid source3/lib/events.c,
>> the remaining blocker is nmbd. I started some patches
>> to convert more nmbd code to tevent, but it needs more work.
>> The patches are in this branch.
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-tevent2
> 
> +1 on that. I'd like to remove source3/lib/events.c also.
> 
>> The patches which just need review are under
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master3-tevent2
>> I'm currently do autobuilds to see if it is stable now.
>> Also with the following hacks on top:
>> (without epoll)
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=a0f5077d0f28be42b97421cdea1219aee08aac71
>> (without poll fallback)
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=7a74e6f9bffab04a24a90a2dc2e5d84a8960827a
>> (and with random fallback)
>> https://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=6dc95cd2d4ea5a10566e8ea43d6aa9ac46b1590f
>>
>> Similar patches already passed autobuilds in all 4 combinations.
>>
>> I've now reviewed the master3-tevent branch
>> (commit 83ce1f9d9504156ea1b8e2a4f5655a48b5bcd1f1),
>> please review and push.
> 
> So just to confirm. The branch you want review and push on to master
> is this one:
> 
> https://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master3-tevent2
> 
> Is that correct (you're not 100% clear in the text above I'm afraid) ?

Yes, more clear than commit 83ce1f9d9504156ea1b8e2a4f5655a48b5bcd1f1 is
not possible :-)

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130301/81215072/attachment.pgp>


More information about the samba-technical mailing list