[RFC] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC when calling the function of clock_gettime in xserver/os/util.c
Adam Jackson
ajax at nwnk.net
Fri Aug 13 08:30:26 PDT 2010
On Fri, 2010-08-13 at 13:08 +0800, ykzhao wrote:
> On Fri, 2010-08-13 at 11:32 +0800, Julien Cristau wrote:
> > On Thu, Aug 12, 2010 at 09:47:23 +0800, ykzhao wrote:
> >
> > > when playing flash h.264 cif video workload, the cpu C0 usage is reduced
> > > from 43% to 42% while the video quality is not affected.
> > >
> > Is 43% vs 42% a really significant win? How close is it to measurement
> > noise?
>
> The purpose of using CLOCK_MONOTONIC_COARSE posix timer is to reduce
> the overhead of read_hpet.
>
> Yes. The 1% ratio seems tiny. But the tiny ratio is related with that
> the total overhead of read_hpet is not very high on the CPU usage(about
> 3%) when playing the video workload. In such case it is not easy to get
> one higher improvement.
On second thought, this seems like it's pretty awkward to use if we
don't know the granularity. And given that we're assuming milliseconds
everywhere, you'd need CONFIG_HZ >= 1000 to get that. Do we have a way
of getting HZ from userspace?
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100813/bc809ede/attachment.pgp>
More information about the xorg-devel
mailing list