From: Marco Tizzoni Subject: Re: [Xen-devel] Re: About profiling xen Date: Thu, 1 Oct 2009 23:05:36 +0200 Message-ID: References: <196324.1267.qm@web94604.mail.in2.yahoo.com> <20090930063747.GG1434@reaktio.net> <4AC3E889.6060407@goop.org> <4AC516EC.3050704@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4AC516EC.3050704@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: "Fajar A." , Fasiha Ashraf , xen , xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Oct 1, 2009 at 10:54 PM, Jeremy Fitzhardinge wrot= e: > On 10/01/09 00:35, Marco Tizzoni wrote: >> On Thu, Oct 1, 2009 at 1:23 AM, Jeremy Fitzhardinge wr= ote: >> >>> Your clocksource is "xen", which is the best possible for a PV xen gues= t. >>> >>> However, a clocksource is for measuring elapsed time, not triggering >>> timers. >>> >> Why? How would you solve the problem of raising events at a fixed rate? >> > > I'm not sure I follow you. =A0In the kernel, the clock*source* subsystem > is for measuring time: its used to implement gettimeofday, as well as > internal time accounting. =A0It isn't directly related to time events. Ok. > The clock*event* mechanism is all about setting up timers to raise events= . > > When running paravirtualized, we use Xen-specific versions of both. Ok. My problem is granularity. In xen I can't raise events more frequently than 1000/s (with timer set to 1000hz). Net test softwares such as netperf or hping use setitimer to send packet at a fixed rate. On a non-xen box they works fine even with 100k packets/sec (i.e. 100k alarms/sec). This can be problematic for streaming software and more in general for soft real-time applications. >>> Unfortunately there doesn't seem to be a /sys file to show the >>> current clockevent source in use, but if you have "xen" clocksource it'= s >>> almost certainly the xen clockevent. >>> >>> However, this is only relevent if you have CONFIG_NO_HZ and >>> CONFIG_HIGHRES_TIMERS enabled. >>> >> I've tried both set/unset but nothing change. >> > > Hm. =A0Its best to leave both enabled either way. > > Try the attached program to get some info about how well timers are > working. =A0Compile with: Thanks for your test, I tried and timers work as expected. m-