Re: a few question on threads affinity and CPU shielding.

From: Tim Hockin
Date: Mon Dec 01 2003 - 12:47:57 EST

On Mon, Dec 01, 2003 at 06:43:16PM +0100, Nicolas Castagné wrote:
> I was very pleased that some patches for controlling CPU affinities
> were merged in the 2.5 (and 2.6) releases of the kernel.
> Where may I find precisions on the patches that are now included ?

> - is there also a patch to shield cpu against the scheduler ?

I have a patch around that does this (against RedHat's backported O(1)).
Forward porting it should be no more difficult that creating it in the first
place :) I was waiting until after 2.6.x was more stable to offer it.

> - is there also a patch to shield cpu against all interruptions
> (especially hard clock interrups) ?

This could be added to my patch.

What my patch added was a sched_setprocstate() syscall, which lets you set a
CPU's run state. Currently I support:

ENABLED - run any task
RESTRICTED - run only tasks with (cpus_allowed == 1 << cpu)
ISOLATED - run only tasks with
(cpus_allowed == 1 << cpu && cpus_allowed_mask == 1 << cpu)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at