Re: Commit 1e5a74059f9 broke utime measurement of ptraced()processes

From: Mike Galbraith
Date: Sat Dec 24 2011 - 02:43:28 EST


On Sat, 2011-12-24 at 10:26 +0300, ÐÑÑÐÐ ÐÐÐÑÐÐÐÐ wrote:

> I believe that the described behaviour is erroneous and in order to
> > lessen the odds of it [waker] being preempted again soon
> one should not mess with utime but rather use another technique. It is also
> interesting why the *user time* needs to be affected? It is inside the kernel
> that the tracer process is woken up, so when
> > handing a few wakeup expense cycles to the wakee
> why not account those cycles as stime?

CPU utilization shifts with wakeup preemption, so there will be visible
effect when you change wakeup preemption in any way.

> Also I'd like to know if there is a way to get reliable utime measurements
> in recent kernels.

If wakeup preemption is undesirable, you could run SCHED_BATCH.

-Mike

--
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/