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

看板DFBSD_kernel作者時間21年前 (2004/09/15 02:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/8 (看更多)
:On Mon, Sep 13, 2004 at 10:53:13PM -0700, Matthew Dillon wrote: :> This patch makes the kernel callout_*() interface per-cpu and MP safe. :> Individual callouts may also be registered as MP safe or not via a second :> argument to callout_reset() (using the same API a FreeBSD-5). : :I never liked the additional argument in FreeBSD-5, but I guess it can't be :avoided for SMP safety. Does it imply that a MP-safe callout always runs on :the CPU it was initially registered on? Have you looked at the timeout API :from NetBSD/OpenBSD, they bind e.g. the function at init time. This might :be more appropiate on this case. Well, except init time is usually in the startup code which is running on only one cpu. I'm binding the cpu when the timeout is actually started, in callout_reset(). We should probably have another API call to specify the cpu, e.g. callout_reset_oncpu(), for those subsystems which want to start their timeouts in the initialization code. :I've been working on this already for dev/netif whenever I did greater changes :to a driver. I've been working on other parts of the code base. If someone :wants to submit patches, I'd like to coordinate this effort off-list. : :Joerg That would be helpful. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #11HpBA00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11HpBA00 (DFBSD_kernel)