[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 1/6] sched: track time spent in IRQ handler
- To: "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Date: Fri, 12 Jun 2020 11:33:44 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9LvR7rgrlC19l7lRbfXikcp4dB6ECnlEC1sPyXN88I8=; b=dpYKBTdfxPQdC6lY/A5hFmFLIJiNvZ4vTMUyUEM+xUn59rygIileZIepSzUHKfZPFec5WbRz1jDdAC8U60w3ls1M/R1LV6ZNVovO5plJRpdg6hXeuS4o1xzGYEIFR+DrXn8H1hEP+8oE0QPeLOsMPiBFBqJzTKxgVyWhn3/ocWoo76P6oLO8cNJ6AMg4IikwNTBg0i/113J3QL3qA5HdOYouflIDFnbEREK/PmoTtRKt2i8bXIAKUqLd40r0E+OmPQWwqofslga5Yv8+lVLRsdXep3PVmIpGxatfI727o25v5xb4DtY4C1OOoyyaS+lNmEm5FAUuiH+AqzHSfCAy7g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jaTlyD4RZQVmVKuY3oMe7yOeHt3eKTqbkHswK9tqzS1d4n3IWOFdZsLRlFwujMvZNkz2gz+q+cD3yM1ILnPa/Mw8jEVFO+fGfWP3ddbWqADLf9+DJbOB2PQrxBwv5l1y3/CqWjcVALqe7+ioCmomrY7qQRz7V6xiYDZPa+CWwtqEKGdIvSe7M4Sq41SbrX7Pi1RMXt0PuvKjVy+jATMSxAWtDIoIR0qQIyGdnyELBKxNPpItlILtZpPtyU1EHcYCIK/ScQGz4MSBovljM1bQ5+NR/0RtZOBeC1L/T9rt0ujcCmEHneEecpRyRQ4HFiPB+zNNp/BPKUFm59t0YXcAww==
- Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
- Cc: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "ian.jackson@xxxxxxxxxxxxx" <ian.jackson@xxxxxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "dfaggioli@xxxxxxxx" <dfaggioli@xxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 12 Jun 2020 11:33:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHWQE+STyWApsQdk0CG54zgwiPygKjUZV2AgAByxQCAAADXAIAAAQ+A
- Thread-topic: [RFC PATCH v1 1/6] sched: track time spent in IRQ handler
On Fri, 2020-06-12 at 12:29 +0100, Julien Grall wrote:
>
> On 12/06/2020 12:26, Volodymyr Babchuk wrote:
> > Hi Jurgen,
> >
> > thanks for the review
> >
> > On Fri, 2020-06-12 at 06:36 +0200, Jürgen Groß wrote:
> >
> > > On 12.06.20 02:22, Volodymyr Babchuk wrote:
> >
> > [...]
> >
> > > > +void vcpu_end_irq_handler(void)
> > > > +{
> > > > + int delta;
> > > > +
> > > > + if (is_idle_vcpu(current))
> > > > + return;
> > > > +
> > > > + ASSERT(current->irq_nesting);
> > > > +
> > > > + if ( --current->irq_nesting )
> > > > + return;
> > > > +
> > > > + /* We assume that irq handling time will not overflow int */
> > >
> > > This assumption might not hold for long running VMs.
> >
> > Basically, this value holds time span between calls to schedule(). This
> > variable gets zeroed out every time scheduler requests for time
> > adjustment value. So, it should not depend on total VM run time.
> This is assuming that the scheduler will be called. With the NULL
> scheduler in place, there is a fair chance this may never be called.
>
> So I think using a 64-bit value is likely safer.
Well, I wanted to use 64-bit value in the first place. But I got the
impression that atomic_t supports only 32-bit values. At least, this is
what I'm seeing in atomic.h
Am I wrong?
> Cheers,
>
|