mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Артем Анисимов" <aanisimov@inbox.ru>
To: Mike Galbraith <efault@gmx.de>
Cc: linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, mingo@elte.hu
Subject: Re: Commit 1e5a74059f9 broke utime measurement of ptraced() processes
Date: Tue, 27 Dec 2011 11:30:36 +0300	[thread overview]
Message-ID: <201112271130.36907.aanisimov@inbox.ru> (raw)
In-Reply-To: <1324712566.5025.12.camel@marge.simson.net>

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

  reply	other threads:[~2011-12-27  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 12:19 Артем Анисимов
2011-12-20 13:39 ` Mike Galbraith
2011-12-24  7:26   ` Артем Анисимов
2011-12-24  7:42     ` Mike Galbraith
2011-12-27  8:30       ` Артем Анисимов [this message]
2011-12-27  8:04         ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201112271130.36907.aanisimov@inbox.ru \
    --to=aanisimov@inbox.ru \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®