From patchwork Wed Sep 11 10:32:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrii Anisov X-Patchwork-Id: 11140871 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1029184E for ; Wed, 11 Sep 2019 10:34:24 +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 CBBB32087E for ; Wed, 11 Sep 2019 10:34:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hylIDiGE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBBB32087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none 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.89) (envelope-from ) id 1i7zvJ-00005M-RJ; Wed, 11 Sep 2019 10:32:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7zvI-000059-97 for xen-devel@lists.xenproject.org; Wed, 11 Sep 2019 10:32:28 +0000 X-Inumbo-ID: 731d45e0-d47f-11e9-978d-bc764e2007e4 Received: from mail-lj1-x243.google.com (unknown [2a00:1450:4864:20::243]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 731d45e0-d47f-11e9-978d-bc764e2007e4; Wed, 11 Sep 2019 10:32:27 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id q64so8938299ljb.12 for ; Wed, 11 Sep 2019 03:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hviWMLdr06u4eT19wJOyn3Rxh1dmcmj/jL5IMjSt0HM=; b=hylIDiGEKzZKhvxX7ZfvD1NLsz2zDkGAx0aTTrBGvnO2WFadXhrAJWciE+MmSY9voV 46HJ1InM5aU2rfAAA2WeYoWFk9YoPMDVlsnQJcVyD5I08Iaaa4totD3SfIk4ZHwoflrR 3NMO08gUQhAUujnwfWVd+V86arlVjt5S8DtXeFXW+HJXdhZSCEixLGdK7pUFQXfKYMJz XtblOj81qAX1GOq6OZp21gmNHelz2cYIHy85u4mjUFOaFTpvG5Jn73NY63zCTLr1teRz xFZ/kHmlG/ilzfcyoQrDSIkvYGhwlCMDqyPEIWCvumCnCDiF581TUSJsxH4XPvhYHp2g ZIIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hviWMLdr06u4eT19wJOyn3Rxh1dmcmj/jL5IMjSt0HM=; b=rZ3ynXfpA15HmmdPHj3taDbHJ66fPS6bvj6Xc4i95n0fHQbEiFli6ZOxlB903wMpuo aZrYsSmU0GQFh7QAkIp1AZhOovxy4DvZ6SQ1nHkCNWuIw3lIfFhb/CppmUwyl13DABgm SV2jxlgqQx/29hQ6xfTvnP3CcLV3BdxIQ5wbYO8d4mQIxQj1EcdTLfQFPEdJDAFtoXlc a3jmJ6HxfQj9y2YssAcGveo8HqyGAKu7i0yi7IGUig2xu9ybRAabdKbYWgPoiBIAcJLB k9hLhBmcPIRUU5A5vp8UkTvPUL3U71eWvRMcriFV6MSwZ935cSYQ1MFquelWUHVHE1Yg WZvQ== X-Gm-Message-State: APjAAAWduQb/odW20LgaHWbn6/+XSFCx2DkGJfu5Y9d4wWhblagEsb4T OftADEM2KOJvBn0Zf1qIsyHHUZbCc7M= X-Google-Smtp-Source: APXvYqw7R+q0NbK+qOCF25zpMlwAoZLN385TpygU3n+b6oeHXvQV2xW6kIRWLUOdTR/0KRxagSDx1w== X-Received: by 2002:a2e:b0d2:: with SMTP id g18mr17936253ljl.91.1568197945882; Wed, 11 Sep 2019 03:32:25 -0700 (PDT) Received: from aanisov-work.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id w27sm4585275ljd.55.2019.09.11.03.32.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Sep 2019 03:32:24 -0700 (PDT) From: Andrii Anisov To: xen-devel@lists.xenproject.org, Dario Faggioli Date: Wed, 11 Sep 2019 13:32:13 +0300 Message-Id: <1568197942-15374-1-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Xen-devel] [RFC 0/9] Changes to time accounting X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Andrii Anisov , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Meng Xu , Jan Beulich , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Andrii Anisov That is the second attempt of the changes for the time accounting in XEN. The initial topic is here [1]. In this series it is introduced a time accounting infrastructure separated from runstates, and made an attempt to use new infra solely for taking scheduling decissions. This series still employs ideas of the initial series about what hypervisor, idle and guest time are. Yet, this series lacks of connection between new time accounting infra and runstate. This is TODO, currently. The main goal of this work is to improve time accounting precission as well as avoiding charging guests for the other entities (guests or hypervisor itself) work. Changes from: Initial RFC series [1]: - Time accounting made independent from runstates infrastructure. - Dropped odd patches to ARM64 code. [1] https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg01839.html Andrii Anisov (9): schedule: Introduce per-pcpu time accounting sysctl: extend XEN_SYSCTL_getcpuinfo interface xentop: show CPU load information arm64: utilize time accounting tacc: Introduce a lockless interface for guest time sched:rtds: get guest time from time accounting code tacc: Introduce a locked interface for guest time sched:credit: get guest time from time accounting code sched:credit2: get guest time from time accounting code tools/xenstat/libxenstat/src/xenstat.c | 50 +++++++++ tools/xenstat/libxenstat/src/xenstat.h | 15 +++ tools/xenstat/libxenstat/src/xenstat_priv.h | 5 + tools/xenstat/xentop/xentop.c | 36 ++++++ xen/arch/arm/arm64/entry.S | 39 ++++++- xen/arch/arm/domain.c | 2 + xen/common/Kconfig | 5 + xen/common/sched_credit.c | 12 +- xen/common/sched_credit2.c | 17 +-- xen/common/sched_rt.c | 4 +- xen/common/schedule.c | 168 +++++++++++++++++++++++++++- xen/common/sysctl.c | 4 + xen/include/public/sysctl.h | 4 + xen/include/xen/sched.h | 50 +++++++++ 14 files changed, 386 insertions(+), 25 deletions(-)