From: "Li,Rongqing" <lirongqing@baidu.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: RE: [PATCH 1/2][v2] cpuidle-haltpoll: Replace default_idle with arch_cpu_idle
Date: Thu, 8 Dec 2022 01:46:35 +0000 [thread overview]
Message-ID: <9e19c594bcf144fbb433fb4cfee54e08@baidu.com> (raw)
In-Reply-To: <080936167059.CAJZ5v0g5kTRE+x-8xC2WwQr11j01ox=Nk0aguiC1_HGPU8W=Rw@mail.gmail.com>
> -----Original Message-----
> From: Rafael J. Wysocki <rafael@kernel.org>
> Sent: Wednesday, December 7, 2022 10:38 PM
> To: Li,Rongqing <lirongqing@baidu.com>
> Cc: tglx@linutronix.de; mingo@redhat.com; bp@alien8.de;
> dave.hansen@linux.intel.com; x86@kernel.org; rafael@kernel.org;
> daniel.lezcano@linaro.org; peterz@infradead.org; akpm@linux-foundation.org;
> tony.luck@intel.com; jpoimboe@kernel.org; linux-kernel@vger.kernel.org;
> linux-pm@vger.kernel.org
> Subject: Re: [PATCH 1/2][v2] cpuidle-haltpoll: Replace default_idle with
> arch_cpu_idle
>
> On Wed, Dec 7, 2022 at 1:42 PM <lirongqing@baidu.com> wrote:
> >
> > From: Li RongQing <lirongqing@baidu.com>
> >
> > When KVM guest has MWAIT and mwait_idle is used as default idle
> > function, but once cpuidle-haltpoll is loaded, default_idle in
> > default_enter_idle is used, which is using HLT, and cause a
> > performance regression. As the commit aebef63cf7ff ("x86: Remove
> > vendor checks from prefer_mwait_c1_over_halt") explains that mwait is
> > preferred
> >
> > so replace default_idle with arch_cpu_idle which can using MWAIT
> > optimization.
> >
> > latency of sockperf ping-pong localhost test is reduced by more 20%
> > unixbench has 5% performance improvements for single core
> >
> > Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> > ---
> > arch/x86/kernel/process.c | 1 +
> > drivers/cpuidle/cpuidle-haltpoll.c | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> > index c21b734..303afad 100644
> > --- a/arch/x86/kernel/process.c
> > +++ b/arch/x86/kernel/process.c
> > @@ -721,6 +721,7 @@ void arch_cpu_idle(void) {
> > x86_idle();
> > }
> > +EXPORT_SYMBOL(arch_cpu_idle);
>
> Why do you need this export at all?
>
When cpuidle-haltpoll is built as module, if arch_cpu_idle is not export, cpuidle-haltpoll will complain "arch_cpu_idle" undefined
Like
ERROR: modpost: "arch_cpu_idle" [drivers/cpuidle/cpuidle-haltpoll.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:126: Module.symvers] Error 1
make: *** [Makefile:1944: modpost] Error 2
Error: Make failed!
I will add the reason to v3
Thanks
-Li
next prev parent reply other threads:[~2022-12-08 1:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 12:41 [PATCH 1/2][v2] cpuidle-haltpoll: Replace default_idle with arch_cpu_idle lirongqing
2022-12-07 12:41 ` [PATCH 2/2][v2] cpuidle-haltpoll: Build as module by default lirongqing
2022-12-07 14:39 ` Rafael J. Wysocki
[not found] ` <080936016634.CAJZ5v0i9J2YimfQsqJiZjFMR9MLG0fdBf+Regr+_PcsYrAE=SQ@mail.gmail.com>
2022-12-08 2:32 ` Li,Rongqing
2022-12-08 11:42 ` Rafael J. Wysocki
2022-12-08 12:42 ` Li,Rongqing
2022-12-08 13:11 ` Rafael J. Wysocki
2022-12-16 15:01 ` Peter Zijlstra
2022-12-07 14:37 ` [PATCH 1/2][v2] cpuidle-haltpoll: Replace default_idle with arch_cpu_idle Rafael J. Wysocki
[not found] ` <080936167059.CAJZ5v0g5kTRE+x-8xC2WwQr11j01ox=Nk0aguiC1_HGPU8W=Rw@mail.gmail.com>
2022-12-08 1:46 ` Li,Rongqing [this message]
2022-12-08 11:39 ` Rafael J. Wysocki
2022-12-08 12:41 ` Li,Rongqing
2022-12-08 13:01 ` Rafael J. Wysocki
2022-12-09 13:44 ` Li,Rongqing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e19c594bcf144fbb433fb4cfee54e08@baidu.com \
--to=lirongqing@baidu.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=daniel.lezcano@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).