From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBD51C433DF for ; Fri, 12 Jun 2020 11:30:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 976D920792 for ; Fri, 12 Jun 2020 11:30:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="lIJwbc2i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 976D920792 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jjhso-0007WB-CW; Fri, 12 Jun 2020 11:30:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jjhsn-0007S1-Pr for xen-devel@lists.xenproject.org; Fri, 12 Jun 2020 11:30:01 +0000 X-Inumbo-ID: 0db0f338-aca0-11ea-b7bb-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0db0f338-aca0-11ea-b7bb-bc764e2007e4; Fri, 12 Jun 2020 11:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9s6nLu83a31Mn24k92CziNOGaf3LXQklsTVVFdKHZDo=; b=lIJwbc2ijq/xHr8E33YHPL1nb2 LXUX22UJlWY1kqT4qp4Go3UzG+A+MLUZni8E5ciSjK0t+9D2AMlSSoBByTjrlPbPh0eSIA5OkjL9s vKmKznCRcy9bRHHEQcWGEVi7lfi7z9/HJzyS5TkxTq6Sb2gsVXqug8ATQ4yBvi0Pu+DQ=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jjhsk-00081m-Qf; Fri, 12 Jun 2020 11:29:58 +0000 Received: from [54.239.6.187] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjhsk-0002Pl-Jf; Fri, 12 Jun 2020 11:29:58 +0000 Subject: Re: [RFC PATCH v1 1/6] sched: track time spent in IRQ handler To: Volodymyr Babchuk , "jgross@suse.com" , "xen-devel@lists.xenproject.org" References: <20200612002205.174295-1-volodymyr_babchuk@epam.com> <20200612002205.174295-2-volodymyr_babchuk@epam.com> <0ce0bbf8-fd15-e87b-727c-56dd7c09cdcb@suse.com> <7ec7b6568afb3df41f8407015c198b1ccb341c5b.camel@epam.com> From: Julien Grall Message-ID: Date: Fri, 12 Jun 2020 12:29:56 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <7ec7b6568afb3df41f8407015c198b1ccb341c5b.camel@epam.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "sstabellini@kernel.org" , "wl@xen.org" , "andrew.cooper3@citrix.com" , "ian.jackson@eu.citrix.com" , "george.dunlap@citrix.com" , "dfaggioli@suse.com" , "jbeulich@suse.com" , "roger.pau@citrix.com" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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. Cheers, -- Julien Grall