public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip 0/4] do not make cputime scaling in kernel
@ 2013-04-04  9:10 Stanislaw Gruszka
  2013-04-04  9:10 ` [PATCH -tip 1/4] cputime: change parameter of thread_group_cputime_adjusted Stanislaw Gruszka
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2013-04-04  9:10 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Frederic Weisbecker, hpa, rostedt, akpm, tglx, Linus Torvalds,
	linux-kernel

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-04-11 15:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04  9:10 [PATCH -tip 0/4] do not make cputime scaling in kernel Stanislaw Gruszka
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox