Re: [PATCH] protect migration/%d etc from sched_setaffinity

From: Joe Korty (joe.korty@ccur.com)
Date: Thu Jul 31 2003 - 18:30:51 EST


On Fri, Aug 01, 2003 at 01:17:34AM +0200, Andi Kleen wrote:
> Joe Korty <joe.korty@ccur.com> writes:
> >
> > diff -Nura linux-2.6.0-test2/include/linux/sched.h.orig linux-2.6.0-test2/include/linux/sched.h
> > --- linux-2.6.0-test2/include/linux/sched.h.orig 2003-07-27 12:57:39.000000000 -0400
> > +++ linux-2.6.0-test2/include/linux/sched.h 2003-07-31 15:52:25.000000000 -0400
> > @@ -488,6 +488,7 @@
> > #define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
> > #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
> > #define PF_READAHEAD 0x00400000 /* I am doing read-ahead */
> > +#define PF_CPULOCK 0x00800000 /* lock users out from changing cpus_allowed */
>
> It would be probably better to just check for ->mm == NULL
>
> This should catch all kernel threads that use daemonize
>
> -Andi

That is what Robert suggested and it is acceptable to me, though suboptimal..it blocks
every daemon, not just the ones that have to be blocked for system survivability.
Joe
-
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/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:52 EST