No subject

deng.chao1 at zte.com.cn deng.chao1 at zte.com.cn
Fri Apr 24 02:52:20 CEST 2015


Hi:
    I am reading the code of fiasco kernel.I have a question about the function "Context::schedule".
    At line 894 in kernel/fiasco/src/kern/context.cpp:

    	"while (EXPECT_FALSE(current_cpu != access_once(&_home_cpu)))"

    As I know, the variable "_home_cpu" indicates the CPU number which the thread that invokes the “schedue ” as a member function is running on。And the variable “current cpu” indicates the CPU number now this code fragment is running on。
    The condition test tells me that it seems the class Context's member function "schedule" will run on a different cpu some time . If it does so, some extra work will need to be done in the "schedule" function. I have searched all of the fiasco kernel sources, but  I did not find this special context.
    So would anybody please tell me whether there has a situation that the "schedule"  function will run on different CPU, why does it happen?

Thanks!


More information about the l4-hackers mailing list