Re: [time] add support for CLOCK_THREAD_CPUTIME_ID and CLOCK_PROCESS_CPUTIME_ID

From: Ulrich Drepper
Date: Sat Sep 25 2004 - 10:23:49 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christoph Lameter wrote:

> Yes and glibc will have to get through contortions to
> simulate a clock that returns the actual cpu time used. Why not cleanly
> do the clock_gettime syscall without doing any redirection of clocks?

First of all, unnecessary kernel code where it is not needed. And
second, because with the definition of the CPUTIME clock in use for many
years now not all variants can be handled in the kernel. We use this
clock to provide access to the TSC functionality. This is nothing the
kernel does.


> Any implementation of the CPUTIME clocks is always easier to do in the
> kernel with just a few lines.

No, you don't know the glibc side.


> Ok, I will dig out my old patch and repost it to glibc-alpha.

I haven't gotten an answer to the question "is there really any value in
this kind of clock?".

- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBVYxt2ijCOnn/RHQRAmohAKCVAlRAxIHBi5uHqoKtfjfORQQNiACdHPuD
aCn2+pHl7MnBmWE2CAmSdb8=
=vJAO
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/