lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p73bqir7myp.fsf@bingen.suse.de>
Date:	17 Mar 2007 19:18:38 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Tomasz Noiński <noix@...ere.pl>
Cc:	linux-kernel@...r.kernel.org, timm@....uni-heidelberg.de,
	arne.wiebalck@....uni-heidelberg.de
Subject: Re: more precise CPU time accounting for x86

Tomasz Noiński <noix@...ere.pl> writes:

> Hi,
> 
> I've written a small patch for more precise process CPU time accounting
> for processors with TSC.
> 
> Currently, accounting is sample-based and it can be fooled by, for
> example, a process that always gives away the rest of it's timeslice.

RDTSC is unfortunately quite slow on some CPUs.

But we already use it in schedule for sched_clock(). I think
an interesting approach would be to use this information
and just sum it up in the task_struct. This would still not
account for interrupts and system time separately, but should
be relatively cheap and give more accurate time. Drawback would
be that user tools would need to be updated to read a "sys+user"
count.

BTW perfctrs on most x86 CPUs can count user/kernel separately,
unfortunately it is hard to find a performance counter that
matches real time well enough and they couldn't easily
separate interrupts vs systime belonging to the process.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ