From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xkDjW4B00zDqZ0 for ; Fri, 1 Sep 2017 19:39:43 +1000 (AEST) From: Michael Ellerman To: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Subject: Re: [PATCH v3 4/4] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead In-Reply-To: <20170830221045.6fd10787@roar.ozlabs.ibm.com> References: <20170825043036.18236-1-npiggin@gmail.com> <20170825043036.18236-5-npiggin@gmail.com> <87pobd1em0.fsf@concordia.ellerman.id.au> <20170830221045.6fd10787@roar.ozlabs.ibm.com> Date: Fri, 01 Sep 2017 19:39:41 +1000 Message-ID: <87k21i69lu.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Nicholas Piggin writes: > On Wed, 30 Aug 2017 21:25:59 +1000 > Michael Ellerman wrote: > >> Nicholas Piggin writes: >> >> > When stop is executed with EC=ESL=0, it appears to execute like a >> > normal instruction (resuming from NIP when woken by interrupt). >> > So all the save/restore handling can be avoided completely. In >> > particular NV GPRs do not have to be saved, and MSR does not have >> > to be switched back to kernel MSR. >> > >> > So move the test for "lite" sleep states out to power9_idle_stop. >> > >> > Reviewed-by: Gautham R. Shenoy >> > Signed-off-by: Nicholas Piggin >> > --- >> > arch/powerpc/kernel/idle_book3s.S | 35 ++++++++++++++++++++++++----------- >> > 1 file changed, 24 insertions(+), 11 deletions(-) >> >> This is blowing up for me on mambo: > > Oh this is a known bug in mambo that does not match the hardware. > > You need >= Mambo.7.8.21, or this firmware patch to work around > the issue for old mambos. As discussed elsewhere this still breaks on new mambo with more than one CPU. So I've dropped it for now. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Date: Fri, 01 Sep 2017 09:39:41 +0000 Subject: Re: [PATCH v3 4/4] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead Message-Id: <87k21i69lu.fsf@concordia.ellerman.id.au> List-Id: References: <20170825043036.18236-1-npiggin@gmail.com> <20170825043036.18236-5-npiggin@gmail.com> <87pobd1em0.fsf@concordia.ellerman.id.au> <20170830221045.6fd10787@roar.ozlabs.ibm.com> In-Reply-To: <20170830221045.6fd10787@roar.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Nicholas Piggin writes: > On Wed, 30 Aug 2017 21:25:59 +1000 > Michael Ellerman wrote: > >> Nicholas Piggin writes: >> >> > When stop is executed with EC=ESL=0, it appears to execute like a >> > normal instruction (resuming from NIP when woken by interrupt). >> > So all the save/restore handling can be avoided completely. In >> > particular NV GPRs do not have to be saved, and MSR does not have >> > to be switched back to kernel MSR. >> > >> > So move the test for "lite" sleep states out to power9_idle_stop. >> > >> > Reviewed-by: Gautham R. Shenoy >> > Signed-off-by: Nicholas Piggin >> > --- >> > arch/powerpc/kernel/idle_book3s.S | 35 ++++++++++++++++++++++++----------- >> > 1 file changed, 24 insertions(+), 11 deletions(-) >> >> This is blowing up for me on mambo: > > Oh this is a known bug in mambo that does not match the hardware. > > You need >= Mambo.7.8.21, or this firmware patch to work around > the issue for old mambos. As discussed elsewhere this still breaks on new mambo with more than one CPU. So I've dropped it for now. cheers