linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Nicholas Piggin <npiggin@gmail.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	msuchanek@suse.de, Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call
Date: Mon, 6 Apr 2020 20:18:29 +0200	[thread overview]
Message-ID: <48d3e2e5-318f-011e-a59b-ec89bd7b76d2@c-s.fr> (raw)
In-Reply-To: <1586135554.pnqaj0giue.astroid@bobo.none>



Le 06/04/2020 à 03:25, Nicholas Piggin a écrit :
> Christophe Leroy's on April 6, 2020 3:44 am:
>> Before : 347 cycles on null_syscall
>> After  : 327 cycles on null_syscall
> 
> The problem I had doing this is that signal delivery wnats full regs,
> and you don't know if you have a signal pending ahead of time if you
> have interrupts enabled.
> 
> I began to try bailing out back to asm to save nvgprs and call again.
> I think that can be made to work, but it is more complication in asm,
> and I soon found that 64s CPUs don't care about NVGPRs too much so it's
> nice to get rid of the !fullregs state.

I tried a new way in v3, please have a look. I split 
syscall_exit_prepare() in 3 parts and the result is unexpected: it is 
better than before the series (307 cycles now versus 311 cycles with 
full ASM syscall entry/exit).

> 
> Possibly another approach would be to leave interrupts disabled for the
> case where you have no work to do. You could create a small
> syscall_exit_prepare_nowork fastpath for that case for 32-bit, perhaps?
> 
> Thanks,
> Nick
> 

Christophe

  reply	other threads:[~2020-04-06 18:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 17:44 [RFC PATCH v2 01/13] powerpc/radix: Make kuap_check_amr() and kuap_restore_amr() generic Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 02/13] powerpc/32s: Create C version of kuap_restore() and kuap_check() Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 03/13] powerpc/8xx: " Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 04/13] powerpc/irq: Add new helpers to play with MSR_EE and MSR_RI on PPC32 Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 05/13] powerpc/syscall: Rename syscall_64.c into syscall.c Christophe Leroy
2020-04-06  1:42   ` Nicholas Piggin
2020-04-06 18:20     ` Christophe Leroy
2020-04-07  0:22       ` Nicholas Piggin
2020-04-05 17:44 ` [RFC PATCH v2 06/13] powerpc/syscall: Make syscall_64.c buildable on PPC32 Christophe Leroy
2020-04-06  1:52   ` Nicholas Piggin
2020-04-06 18:21     ` Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 07/13] powerpc/syscall: Use is_compat_task() Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 08/13] powerpc/syscall: Save r3 in regs->orig_r3 Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 09/13] powerpc/syscall: Selectively check MSR_RI and MSR_PR on syscall entry Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 10/13] powerpc/syscall: system call implement entry/exit logic in C for PPC32 Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 11/13] powerpc/syscall: Avoid stack frame in likely part of syscall_call_exception() Christophe Leroy
2020-04-06  1:29   ` Nicholas Piggin
2020-04-06 18:19     ` Christophe Leroy
2020-04-05 17:44 ` [RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call Christophe Leroy
2020-04-06  1:25   ` Nicholas Piggin
2020-04-06 18:18     ` Christophe Leroy [this message]
2020-04-07  0:26       ` Nicholas Piggin
2020-04-05 17:44 ` [RFC PATCH v2 13/13] powerpc/kernel: Do not use READ_ONCE() to access current thread_info flags Christophe Leroy
2020-04-06  1:39   ` Nicholas Piggin
2020-04-06  1:40 ` [RFC PATCH v2 01/13] powerpc/radix: Make kuap_check_amr() and kuap_restore_amr() generic Nicholas Piggin

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=48d3e2e5-318f-011e-a59b-ec89bd7b76d2@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.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).