mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	hpa@zytor.com, rostedt@goodmis.org, akpm@linux-foundation.org,
	tglx@linutronix.de,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH -tip 0/4] do not make cputime scaling in kernel
Date: Thu,  4 Apr 2013 11:10:31 +0200	[thread overview]
Message-ID: <1365066635-2959-1-git-send-email-sgruszka@redhat.com> (raw)

This patch series removes cputime scaling from kernel. It can be easily
done in user space using floating point if we provide sum_exec_runtime,
what patches 2/4 and 3/4 do. I have procps patch which utilize that:

http://people.redhat.com/sgruszka/procps-use-sum_exec_runtime.patch

I will post it, if this patch set will be queued.

Change affect also getrusage() and times() syscals, but I don't think
kernel give guarantees about utime/stime precision, in a matter of fact
before commit b27f03d4bdc145a09fb7b0c0e004b29f1ee555fa, we do not
perform any scaling and we provided raw cputime values to user space.

Providing sum_exec_runtime via proc is done against malware that utilize
lot of cpu time but hide itself from top program.

This affect kernels not compiled with CONFIG_VIRT_CPU_ACCOUNTING_{GEN,NATIVE},
if user choose to compile kernel with some of those options, he/she will
have more precise cputime accounting, what is documented in Kconfig.


             reply	other threads:[~2013-04-04  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  9:10 Stanislaw Gruszka [this message]
2013-04-04  9:10 ` [PATCH -tip 1/4] cputime: change parameter of thread_group_cputime_adjusted Stanislaw Gruszka
2013-04-04  9:10 ` [PATCH -tip 2/4] procfs: add sum_exec_runtime to /proc/PID/stat Stanislaw Gruszka
2013-04-04  9:10 ` [PATCH -tip 3/4] sched,proc: add csum_sched_runtime " Stanislaw Gruszka
2013-04-04  9:10 ` [PATCH -tip 4/4] cputime: remove scaling Stanislaw Gruszka
2013-04-04 12:31 ` [PATCH -tip 0/4] do not make cputime scaling in kernel Frederic Weisbecker
2013-04-04 13:10   ` Stanislaw Gruszka
2013-04-04 13:47     ` Frederic Weisbecker
2013-04-05 12:56       ` Stanislaw Gruszka
2013-04-08 15:32       ` Ingo Molnar
2013-04-11 15:17         ` Frederic Weisbecker

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=1365066635-2959-1-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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®