From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Improve parking of stopped CPUs
Date: Wed, 1 Feb 2017 14:16:57 +0000 [thread overview]
Message-ID: <20170201141656.GB8177@arm.com> (raw)
In-Reply-To: <1485942532-2643-1-git-send-email-jnair@caviumnetworks.com>
On Wed, Feb 01, 2017 at 09:48:52AM +0000, Jayachandran C wrote:
> The current code puts the stopped cpus in an 'yield' instruction loop.
> Using a busy loop here is unnecessary, we can use the cpu_park_loop()
> function here to do a wfi/wfe.
>
> Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
> ---
> arch/arm64/kernel/smp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index cbaab44..0691d2f 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -829,8 +829,7 @@ static void ipi_cpu_stop(unsigned int cpu)
>
> local_irq_disable();
>
> - while (1)
> - cpu_relax();
> + cpu_park_loop();
> }
Hmm, so we actually added the yield for QEMU's benefit iirc, where QEMU
will trap the yield and schedule a different vCPU. Should we be adding
a yield to cpu_park_loop instead?
Will
next prev parent reply other threads:[~2017-02-01 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 9:48 [PATCH] arm64: Improve parking of stopped CPUs Jayachandran C
2017-02-01 14:16 ` Will Deacon [this message]
2017-02-01 14:31 ` Suzuki K Poulose
2017-02-01 15:07 ` Will Deacon
2017-02-02 7:42 ` Jayachandran C
2019-05-16 18:44 ` Aaro Koskinen
2019-05-18 22:19 ` Jayachandran Chandrasekharan Nair
2019-05-18 23:12 ` Aaro Koskinen
2019-05-24 19:24 ` [EXT] " Jayachandran Chandrasekharan Nair
2019-05-23 10:05 ` Will Deacon
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=20170201141656.GB8177@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.