Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672565

Re: [PATCH 0/2] x86/idle: add halt poll support

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 0/2] x86/idle: add halt poll support
Date Thu, 22 Jun 2017 14:00:03 +0200
Message-ID <tV8Wf-4b0-29@gated-at.bofh.it> (permalink)
References <tV8tb-3Zd-3@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CSmBr/ugqttcHLpjQrHI67Uevf2xLGar/LEYKnbIyGk=; b=Gjam1DbAZTr+IJzS5/xES0e+pwfbGQzphvpEMbH+dEBeredeNKH36YukSwHkhnMJPk g3b0iFFuEdH8TnMc6ivwkajbMcvx0+LcOzdxVP8Oy2YkYT/hhkPtgiGGKeJRwH9EbKuQ FivERY32aT20jqX4PPeBbMWfn2JIwPPqpj6/h9Wwuko3UKTm4ZXO+l65J2ehfLNUixwp mYBm0YyFaYPWOpfA5Bl4rs1cLN4A15pLo3FZwmhKgmD+fUPzmo5Ox0R5up3DxO5Rh2Wv hLouSYlKoiknfjQNgZUFgWdsTG8Xr/jZSZpb45BHepRfrueD1+Z0dgiCbIPUzh9NV0u0 8Rcg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CSmBr/ugqttcHLpjQrHI67Uevf2xLGar/LEYKnbIyGk=; b=U2ulldCUilu7NF4r4n9l+WIKcShDO5hKB1EVl2sV6M4R3nXnaReKVhwWqs+HiMP379 oYx1GK8lZpyVfOV8QgD36Kh+OPcmZUl4XIP9+9JGGrvtqOIlah95achMtkG0aZ9EFvR+ r1ZsN5igXDpgU4oETNA6nB205mhl5w7BCHDjJ9p0bEg8gP4tbbVu64AaanmDJHgaRPyX GgHnkbRu48YgvGqT+U8eiVEMg9CtheOVSlwYJ+XPv84Pv/HsIPSFEHYSearDZyPh8YNg hnrvgZKZBgopLi2ueJho2QC7Yh16jM/OWkJOjbVmGRoJsrEa2b3BzK5E/dQneqA9042o qERQ==
X-Gm-Message-State AKS2vOx6mlcHY7CRBEV+ZbtkA4XLdlAfTLWwvC8fVrBjgZIlAS9S7Ls0 F9RGniu40ibVjrVMjUxkA5dGDiv+lg==
X-Received by 10.202.78.74 with SMTP id c71mr887563oib.204.1498132203029; Thu, 22 Jun 2017 04:50:03 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 50
Organization linux.* mail to news gateway
X-Original-Cc Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, "the arch/x86 maintainers" <x86@kernel.org>, Jonathan Corbet <corbet@lwn.net>, tony.luck@intel.com, Borislav Petkov <bp@alien8.de>, Peter Zijlstra <peterz@infradead.org>, mchehab@kernel.org, Andrew Morton <akpm@linux-foundation.org>, krzk@kernel.org, jpoimboe@redhat.com, Andy Lutomirski <luto@kernel.org>, Christian Borntraeger <borntraeger@de.ibm.com>, thgarnie@google.com, rgerst@gmail.com, minipli@googlemail.com, douly.fnst@cn.fujitsu.com, nicstange@gmail.com, Frederic Weisbecker <fweisbec@gmail.com>, dvlasenk@redhat.com, Daniel Bristot de Oliveira <bristot@redhat.com>, yamada.masahiro@socionext.com, mika.westerberg@linux.intel.com, Chen Yu <yu.c.chen@intel.com>, aaron.lu@intel.com, Steven Rostedt <rostedt@goodmis.org>, me@kylehuey.com, Len Brown <len.brown@intel.com>, Prarit Bhargava <prarit@redhat.com>, hidehiro.kawai.ez@hitachi.com, fengtiantian@huawei.com, pmladek@suse.com, jeyu@redhat.com, Larry.Finger@lwfinger.net, zijun_hu@htc.com, luisbg@osg.samsung.com, johannes.berg@intel.com, niklas.soderlund+renesas@ragnatech.se, zlpnobody@gmail.com, adobriyan@gmail.com, fgao@ikuai8.com, ebiederm@xmission.com, subashab@codeaurora.org, arnd@arndb.de, Matt Fleming <matt@codeblueprint.co.uk>, Mel Gorman <mgorman@techsingularity.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-doc@vger.kernel.org, linux-edac@vger.kernel.org, kvm <kvm@vger.kernel.org>
X-Original-Date Thu, 22 Jun 2017 19:50:02 +0800
X-Original-Message-ID <CANRm+CyBKp_8CwNKzaMm0J0m476X52UsqmH7NvDsjQnFa8nqzg@mail.gmail.com>
X-Original-References <1498130534-26568-1-git-send-email-root@ip-172-31-39-62.us-west-2.compute.internal>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1672565

Show key headers only | View raw


2017-06-22 19:22 GMT+08:00 root <yang.zhang.wz@gmail.com>:
> From: Yang Zhang <yang.zhang.wz@gmail.com>
>
> Some latency-intensive workload will see obviously performance
> drop when running inside VM. The main reason is that the overhead
> is amplified when running inside VM. The most cost i have seen is
> inside idle path.
> This patch introduces a new mechanism to poll for a while before
> entering idle state. If schedule is needed during poll, then we
> don't need to goes through the heavy overhead path.
>
> Here is the data i get when running benchmark contextswitch
> (https://github.com/tsuna/contextswitch)
> before patch:
> 2000000 process context switches in 4822613801ns (2411.3ns/ctxsw)
> after patch:
> 2000000 process context switches in 3584098241ns (1792.0ns/ctxsw)

If you test this after disabling the adaptive halt-polling in kvm?
What's the performance data of w/ this patchset and w/o the adaptive
halt-polling in kvm, and w/o this patchset and w/ the adaptive
halt-polling in kvm? In addition, both linux and windows guests can
get benefit as we have already done this in kvm.

Regards,
Wanpeng Li

> Yang Zhang (2):
>   x86/idle: add halt poll for halt idle
>   x86/idle: use dynamic halt poll
>
>  Documentation/sysctl/kernel.txt          | 24 ++++++++++
>  arch/x86/include/asm/processor.h         |  6 +++
>  arch/x86/kernel/apic/apic.c              |  6 +++
>  arch/x86/kernel/apic/vector.c            |  1 +
>  arch/x86/kernel/cpu/mcheck/mce_amd.c     |  2 +
>  arch/x86/kernel/cpu/mcheck/therm_throt.c |  2 +
>  arch/x86/kernel/cpu/mcheck/threshold.c   |  2 +
>  arch/x86/kernel/irq.c                    |  5 ++
>  arch/x86/kernel/irq_work.c               |  2 +
>  arch/x86/kernel/process.c                | 80 ++++++++++++++++++++++++++++++++
>  arch/x86/kernel/smp.c                    |  6 +++
>  include/linux/kernel.h                   |  5 ++
>  kernel/sched/idle.c                      |  3 ++
>  kernel/sysctl.c                          | 23 +++++++++
>  14 files changed, 167 insertions(+)
>
> --
> 1.8.3.1
>

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] x86/idle: add halt poll support root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
  [PATCH 1/2] x86/idle: add halt poll for halt idle root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
    Re: [PATCH 1/2] x86/idle: add halt poll for halt idle Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 16:30 +0200
      Re: [PATCH 1/2] x86/idle: add halt poll for halt idle Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
  [PATCH 2/2] x86/idle: use dynamic halt poll root <yang.zhang.wz@gmail.com> - 2017-06-22 13:30 +0200
    Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-22 14:00 +0200
      Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:00 +0200
        Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-27 13:30 +0200
          Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 14:10 +0200
            Re: [PATCH 2/2] x86/idle: use dynamic halt poll Wanpeng Li <kernellwp@gmail.com> - 2017-06-27 14:30 +0200
              Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 14:30 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 15:50 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 16:00 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 16:30 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 16:30 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-07-03 11:30 +0200
                Re: [PATCH 2/2] x86/idle: use dynamic halt poll Thomas Gleixner <tglx@linutronix.de> - 2017-07-03 12:10 +0200
    Re: [PATCH 2/2] x86/idle: use dynamic halt poll Thomas Gleixner <tglx@linutronix.de> - 2017-06-22 16:40 +0200
      Re: [PATCH 2/2] x86/idle: use dynamic halt poll Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
    Re: [PATCH 2/2] x86/idle: use dynamic halt poll kbuild test robot <lkp@intel.com> - 2017-06-23 00:50 +0200
  Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-22 13:40 +0200
  Re: [PATCH 0/2] x86/idle: add halt poll support Wanpeng Li <kernellwp@gmail.com> - 2017-06-22 14:00 +0200
    Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 06:10 +0200
      Re: [PATCH 0/2] x86/idle: add halt poll support Wanpeng Li <kernellwp@gmail.com> - 2017-06-23 06:40 +0200
        Re: [PATCH 0/2] x86/idle: add halt poll support Yang Zhang <yang.zhang.wz@gmail.com> - 2017-06-23 08:50 +0200
          Re: [PATCH 0/2] x86/idle: add halt poll support Radim Krčmář <rkrcmar@redhat.com> - 2017-06-27 16:10 +0200

csiph-web