Re: [PATCH 3/8] Add a PF flag for ksoftirqd identification

Peter Zijlstra
2010-10-15T14:26:33Z

On Mon, 2010-10-04 at 17:03 -0700, Venkatesh Pallipadi wrote:
> @@ -1234,6 +1234,7 @@ struct task_struct {
>
> /* Revert to default priority/policy when forking */
> unsigned sched_reset_on_fork:1;
> + unsigned sched_thread_bound:1; /* Thread bound to specific cpu */
>
> pid_t pid;
> pid_t tgid;
> @@ -1708,7 +1709,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
> #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
> #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */
> #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */
> -#define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */
> +#define PF_KSOFTIRQD 0x04000000 /* I am ksoftirqd */

No need to do that, there's two free bits, 0x1 and 0x1000 (although this
latter is pending in Andrew's tree).