[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201112271130.36907.aanisimov@inbox.ru>
Date: Tue, 27 Dec 2011 11:30:36 +0300
From: Артем Анисимов
<aanisimov@...ox.ru>
To: Mike Galbraith <efault@....de>
Cc: linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl, mingo@...e.hu
Subject: Re: Commit 1e5a74059f9 broke utime measurement of ptraced() processes
On Saturday 24 December 2011 10:42:46, Mike Galbraith wrote :
>
> > 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.
> CPU utilization shifts with wakeup preemption, so there will be visible
> effect when you change wakeup preemption in any way.
Thanks, SCHED_BATCH does solve my problem. I'd like to modify the man page
times (2) so that it includes a warning on utime of processes that wake each
other. Do you find the following note correct?
----- to be added to times (2) -----
On Linux, the user time of a process depends on pattern of wakeups of the
process. The scheduler is permitted to cut waker's CPU usage and hand a few
wakeup expense cycles to the wakee that preempted. As a consequence, if two
processes A and B wake each other frequently (e.g., they communicate via
pipes, or by sending signals) then only the collective user time of A and B is
well defined; individual user times of A and B can be arbitrarily
redistributed between them. If this behaviour is undesirable then both
processes need to use the SCHED_BATCH scheduler class, see
sched_setscheduler(2).
----- to be added to times (2) -----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists