From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 12/16] system call optimization.
Date: Tue, 10 Jul 2007 11:29:47 +0200 [thread overview]
Message-ID: <20070710093121.020580356@de.ibm.com> (raw)
In-Reply-To: 20070710092935.896013926@de.ibm.com
[-- Attachment #1: 012-svc-speedup.diff --]
[-- Type: text/plain, Size: 2322 bytes --]
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
After the in-kernel system call has been remove the system call path
can be optimized. The problem state bit of the old psw is always set
between system_call and sysc_do_svc. SAVE_ALL_SVC uses this information
to avoid two instructions.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/entry.S | 7 ++++++-
arch/s390/kernel/entry64.S | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
Index: quilt-2.6/arch/s390/kernel/entry64.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/entry64.S
+++ quilt-2.6/arch/s390/kernel/entry64.S
@@ -99,6 +99,11 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_
larl %r13,system_call
.endm
+ .macro SAVE_ALL_SVC psworg,savearea
+ la %r12,\psworg
+ lg %r15,__LC_KERNEL_STACK # problem state -> load ksp
+ .endm
+
.macro SAVE_ALL_SYNC psworg,savearea
la %r12,\psworg
tm \psworg+1,0x01 # test problem state bit
@@ -207,7 +212,7 @@ system_call:
STORE_TIMER __LC_SYNC_ENTER_TIMER
sysc_saveall:
SAVE_ALL_BASE __LC_SAVE_AREA
- SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
+ SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
Index: quilt-2.6/arch/s390/kernel/entry.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/entry.S
+++ quilt-2.6/arch/s390/kernel/entry.S
@@ -107,6 +107,11 @@ STACK_SIZE = 1 << STACK_SHIFT
l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13
.endm
+ .macro SAVE_ALL_SVC psworg,savearea
+ la %r12,\psworg
+ l %r15,__LC_KERNEL_STACK # problem state -> load ksp
+ .endm
+
.macro SAVE_ALL_SYNC psworg,savearea
la %r12,\psworg
tm \psworg+1,0x01 # test problem state bit
@@ -218,7 +223,7 @@ system_call:
STORE_TIMER __LC_SYNC_ENTER_TIMER
sysc_saveall:
SAVE_ALL_BASE __LC_SAVE_AREA
- SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
+ SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
lh %r7,0x8a # get svc number from lowcore
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2007-07-10 9:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 9:29 [patch 00/16] First s390 patchset for 2.6.22+ Martin Schwidefsky
2007-07-10 9:29 ` [patch 01/16] vmcp cleanup Martin Schwidefsky
2007-07-10 9:29 ` [patch 02/16] Fixed comment typo Martin Schwidefsky
2007-07-10 9:29 ` [patch 03/16] sclp: introduce some new interfaces Martin Schwidefsky
2007-07-10 9:29 ` [patch 04/16] sclp: Test facility list before executing a service call Martin Schwidefsky
2007-07-10 9:29 ` [patch 05/16] fixed cdl-format detection Martin Schwidefsky
2007-07-10 9:29 ` [patch 06/16] zcore: Fix __user annotation Martin Schwidefsky
2007-07-10 9:29 ` [patch 07/16] smp: Merge smp_count_cpus() and smp_get_save_areas() Martin Schwidefsky
2007-07-10 9:29 ` [patch 08/16] Bogomips calculation for 64 bit Martin Schwidefsky
2007-07-10 9:29 ` [patch 09/16] Program check in diag 210 under 31 bit Martin Schwidefsky
2007-07-10 9:29 ` [patch 10/16] Remove volatile from atomic_t Martin Schwidefsky
2007-07-10 9:29 ` [patch 11/16] dasd: Avoid compile warnings on !CONFIG_DASD_PROFILE Martin Schwidefsky
2007-07-10 9:29 ` Martin Schwidefsky [this message]
2007-07-10 9:29 ` [patch 13/16] zcrypt: fix request timeout handling Martin Schwidefsky
2007-07-10 9:29 ` [patch 14/16] cio: Remove prototype for non-existing function cmf_reset() Martin Schwidefsky
2007-07-10 9:29 ` [patch 15/16] s390: rename CPU_IDLE to S390_CPU_IDLE Martin Schwidefsky
2007-07-10 9:29 ` [patch 16/16] vmlogrdr function annotation Martin Schwidefsky
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=20070710093121.020580356@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.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