Re: callout patch - make callouts per-cpu and MP safe.

看板DFBSD_kernel作者時間21年前 (2004/09/15 02:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/8 (看更多)
:I'm asking because I don't think the callout_reset arguments which specify :the target function and argument over and over again are the normal usage :case. I'm not 100% sure of all uses, but e.g. for the NICs the arguments :are always static. : :Have a look at OpenBSD's sys/timeout.h, they have timeout_set, :timeout_add and timeout_del. : :timeout_set gets the function and data parameter, timeout_add only the :wanted delay. It's simpler to use because you don't have to worry about :thos two all over the place. : :Both provide the same functionality and could be implemented in parallel, :sure. But we could avoid having to change the existing API and could :convert them on a case-by-case base. : :Joerg Well, callout_reset() is the only way to start a new timeout using the 'new' API in FreeBSD/DragonFly. I like the OpenBSD method better (as you describe it), but it would be a considerable amount of work to change our APIs. If you want to change over to the OpenBSD API I would first say that we should get rid of the 'old' API (timeout() / untimeout()). Once we get rid of the 'old' API we can shift the 'new' API over to a 'newer then new' OpenBSD API :-) -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #11HpBD00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11HpBD00 (DFBSD_kernel)