From: Matthew Wilcox <willy@debian.org>
To: Randolph Chung <tausq@debian.org>
Cc: Matthew Wilcox <willy@debian.org>,
Carlos O'Donell <carlos@baldric.uwo.ca>,
parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] Generic light-weight syscall.
Date: Mon, 28 Jul 2003 21:37:53 +0100 [thread overview]
Message-ID: <20030728203753.GF3840@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030728203041.GH22976@tausq.org>
On Mon, Jul 28, 2003 at 01:30:41PM -0700, Randolph Chung wrote:
> Why not add a flag to syscall() which indicates whether this is a "fast"
> syscall or a "slow" syscall, and based on this, decide whether to do all
> the register spilling, etc when entering the kernel? Then we can
> implement the atomic ops as additional "syscalls"....
>
> I would think that there is at least some amount of logic that needs to
> be there everytime you enter/exit the kernel, irregardless of whether
> you are doing a "fast syscall" (i.e. no need to save the processor
> state, etc) or a regular one... i would hope we don't need to have two
> copies of that logic.
>
> Carlos had some concerns that this means fast syscalls (or regular ones
> perhaps) will always incur a mispredicted branch and/or extra stack
> manipulations that may not be needed..... but i'm not yet convinced that
> there is enough overhead to make this a problem. what do others think?
I don't think enough syscalls are "fast" to make this worth doing.
Most of the things people are talking about for lightweight syscalls are
things that could/should be done in userspace ... except that you need to
be privileged to use them. So the optimum way to solve them is to have a
special calling convention and todo the absolute minimum amount of work.
Setting cr26 is a great example because we would do it in userspace if
the architecture let us.
Does anyone have a better definition for lightweight syscall? How about
"Cannot sleep, called frequently, must be fast"?
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
prev parent reply other threads:[~2003-07-28 20:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-25 6:37 [parisc-linux] Generic light-weight syscall Carlos O'Donell
2003-07-25 11:37 ` Matthew Wilcox
2003-07-26 17:48 ` Carlos O'Donell
2003-07-26 18:00 ` Carlos O'Donell
2003-07-27 12:27 ` Grant Grundler
2003-07-28 15:57 ` Carlos O'Donell
2003-07-28 17:45 ` Matthew Wilcox
2003-07-28 19:04 ` Carlos O'Donell
2003-07-28 19:14 ` Matthew Wilcox
2003-07-28 21:10 ` Richard Hirst
2003-07-29 17:50 ` Carlos O'Donell
2003-07-29 18:55 ` Grant Grundler
2003-07-29 21:06 ` Richard Hirst
2003-07-29 23:36 ` Carlos O'Donell
2003-07-30 16:37 ` Thibaut VARENE
2003-07-29 23:38 ` Carlos O'Donell
2003-07-29 18:51 ` Grant Grundler
2003-07-27 20:43 ` Michael S.Zick
2003-07-28 20:30 ` Randolph Chung
2003-07-28 20:37 ` Matthew Wilcox [this message]
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=20030728203753.GF3840@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=carlos@baldric.uwo.ca \
--cc=parisc-linux@parisc-linux.org \
--cc=tausq@debian.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