Re: [PATCH v4] context_tracking: Add comments on interface andinternals

From: Andrew Morton
Date: Wed Jan 16 2013 - 17:06:36 EST


On Wed, 16 Jan 2013 16:49:21 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Wed, 2013-01-16 at 13:18 -0800, Andrew Morton wrote:
> > On Wed, 16 Jan 2013 17:16:37 +0100
>
> > I still don't understand NOHZ's role in this whole thing :(
>
> It's not for idle NOHZ, but "process" NOHZ.
>
> That is if we have only one task running on a CPU, we don't want a tick
> interrupt to bother it. This is because there's lots of users out there
> that want an uninterrupted task. A task that doesn't ever get bothered
> by the kernel. If it's in userspace, it stays in userspace (no
> interrupts), until it calls into the kernel itself (syscall). Even when
> its in the kernel, we still don't need the tick interrupt if its the
> only task.

oh, is that what TIF_NOHZ does ;)

> But the scheduler isn't the only thing that uses this tick. To remove
> the tick, we need to satisfy all the other users (printk, delayed work,
> u/s-times).
>
> To still keep up the stats of user and kernel times for the task, we
> need to record when the task switches from user to kernel and back
> again. Hence the context tracking code.
>
> Makes more sense?

yup thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/