lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How can I migrate a currently running task?
2008/6/27 夏亮 <xiaiaxaxi@sjtu.edu.cn>:
> Hi,
>
> I am working on Intel Duo Core with Linux OS 2.6.21, and I'd like to
> migrate task from one cpu to another cpu.
> In SMP systems, load_balance() function uses move_tasks() to move processes
> from source runqueue to local runqueue, but it does not move a currently
> running task. If I want to migrate a currently running task from source
> runqueue to local runqueue, how can I do? Any suggestion is preferred.
> Thanks!

Some high-prio task takes away CPU from a 'target' task and then
pushes it onto another CPU. That's what 'migration_thread' does.

Take a look at use-cases of migrate_task() in sched.c.


>
> Liang
>

--
Best regards,
Dmitry Adamushko


\
 
 \ /
  Last update: 2008-06-27 16:29    [W:0.079 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site