Re: [RFC PATCH]Multi-threaded Initcall with dependence support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yang Sheng
Date: Monday, May 28, 2007 - 6:47 pm

On Tuesday 29 May 2007 06:52, Randy Dunlap wrote:

We didn't got the precise data at hand now, because we should build a complete  
stable initcall dependence relationship for it, but we can't do it now. 

But we have done a relative stable test in a common x86_64 machine, with 2 
threads and one dependence relation(pnpacpi_init depends on pnp_init and 
acpi_init). The result is the time spending on initcall calling reducing from 
about _5s_ to _2s_ (make the kernel with the defconfig). We analyzed the 
dmesg and found the most of time was save by run ide_generic_init and 
piix_init in parallel. 

Of course the dependence in the test case is not sufficient, but the effect is 
shown. 

We think this patch would be very useful in some embed deviced which requires 
fast boot speed. Some server may benefit too because of it's long time for 
device initiation. 


Thanks for advise! Next time I will be more careful on coding style and check 
the patch following the document above. 

The patch below is a prototype now. Some problem can't be solve in current 
stage, like the map function's algorithm complexity is O(n^2). I have another 
method for this but require some duplicate name initcall's rename. 

Thanks!


The msg above comes from the initcall_debug code in the tree.


This is the thread number which would be run at the same time. Should be able 
to config...


Yeah, I shouldn't use panic here. In fact, if dpt->prev.func is not found, 
which the initcall it depends is not exist in current image. But we can 
ignore it to provide more flexibly. 


Thanks!

-- 
regards
Yang, Sheng
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC PATCH]Multi-threaded Initcall with dependence support, Yang Sheng, (Mon May 28, 6:47 pm)