Re: [PATCH] syscall interface for cpu affinity

Andreas Jaeger (aj@suse.de)
Sun, 10 Mar 2002 21:29:31 +0100


Robert Love <rml@tech9.net> writes:

> Linus,
>
> I have updated the patch a bit and resycned to 2.5.6. Are you
> interested? I believe a user interface for setting task CPU affinity is
> useful and completes the rest of our sched_* syscalls. A syscall
> implementation seems to be what everyone wants (I have a proc-interface,
> too...)

Please add the procinterface also! I've found it today (for 2.4.18)
and it's much easier to use with existing programs.

Andreas

> This patch implements
>
> int sched_set_affinity(pid_t pid, unsigned int len,
> unsigned long *new_mask_ptr);
>
> int sched_get_affinity(pid_t pid, unsigned int *user_len_ptr,
> unsigned long *user_mask_ptr)
>
> which set and get the cpu affinity (task->cpus_allowed) for a task,
> using the set_cpus_allowed function in Ingo's scheduler. The functions
> properly support changes to cpus_allowed, implement security, and are
> well-tested.
>
> They are based on Ingo's older affinity syscall patch and my older
> affinity proc patch.
>
> Comments?

Please add it for all archs - this is not only interesting for x86,
Andreas

[...]

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj
-
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/