lkml.org 
[lkml]   [2005]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.6.11-mm2

    On 03.09, Robert Love wrote:
    > On Tue, 2005-03-08 at 23:36 +0000, J.A. Magallon wrote:
    >
    > > Can cpu affinity really be changed for a running process ?
    >
    > Yes.
    >
    > > Does it need something like io or yielding to take effect ?
    >
    > No.
    >
    ...
    >
    > Although, you have the syntax wrong. It should be
    >
    > taskset -c 0 -p 8277
    >

    That was what I first tried, but:

    werewolf:~> ps -ef | grep box
    magallon 8638 8629 99 00:47 pts/0 00:01:54 box-d --out box.srf @opt
    magallon 8733 8643 0 00:48 pts/2 00:00:00 grep box
    werewolf:~> taskset -c 0 -p 8638
    execvp: No such file or directory
    failed to execute -p

    >
    > > The program uses posix threads, 2 in this case. The two threads change from
    > > cpu sometimes (not too often), but do not go into the same processor
    > > immediately as when I start the program directly with runon/taskset.
    >
    > You have to bind all of the threads individually.
    >

    Ahh, damn, that explains it. I use a main thread that does nothing but
    wait for the worker threads. So it sure gets moved to CPU0, but as it
    does not waste CPU time, I do not see it...

    Thanks. Will see what can I do with my threads. cpusets, perhaps...

    --
    J.A. Magallon <jamagallon()able!es> \ Software is like sex:
    werewolf!able!es \ It's better when it's free
    Mandrakelinux release 10.2 (Cooker) for i586
    Linux 2.6.11-jam3 (gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)) #1


    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:11    [W:0.021 / U:91.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site