[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: How can I migrate a currently running task?
From:       "Bart Van Assche" <bart.vanassche () gmail ! com>
Date:       2008-06-27 13:25:56
Message-ID: e2e108260806270625o44ebe7a0u8250fa0bd5e976bd () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jun 27, 2008 at 3:17 PM, $B2FN<(B <xiaiaxaxi@sjtu.edu.cn> wrote:
> 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.

Are you familiar with the glibc pthread_setaffinity_np() function
and/or the sched_setaffinity() system call ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic