I think a thread maybe migrated to another core due to contention of helping lock.
But what do you mean by "some extra work will need to be done in the "schedule" function"?
What is "extra work" and "special context"?

Yuxin

On Thu, Apr 23, 2015 at 8:52 PM, <deng.chao1@zte.com.cn> wrote:

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!
_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers