From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [RFC] Optimi[zs]e copy_*_user routines
Date: Thu, 9 Sep 2004 17:15:57 -0700 [thread overview]
Message-ID: <20040910001557.GK28659@tausq.org> (raw)
In-Reply-To: <20040910000032.GJ28659@tausq.org>
In reference to a message from Randolph Chung, dated Sep 09:
> This has been on my todo list for sometime -- the parisc kernel
> currently uses a one-byte-at-a-time implementation for
> copy_{to,from,in}_user. Obviously there is much room for improvement.
> Here's an attempt at a more optimal version.
A few more addon questions/RFCs:
- this patch relies on using fp regs for copy operations. In our current
kernel we actually have -mdisable-fpregs, but i was not able to
ascertain why. we don't currently have fp lazy state saving. there's
been some talk about doing this, but it requires some help from gcc.
is this ok?
- i have a test suite for testing the copy routine in userspace, so
memcpy.c is written in a way to make it easily sharable between
userspace and kernel. is that ok to include the userspace support code
in the kernel?
- this is the first time the kernel has had to change sr2 in the kernel
(thus Carlos' earlier patch to restore it in the syscall path).
Arguably we should not do the sr2 save/restore in the syscall path and
instead do it in the copy routines, in order to make syscall as fast
as possible. Thoughts?
Alternatively, if we play some tricks with the preprocessor we can get
away with only using sr1, but having 3 copies of the copy routines in
the code. I actually tried this, but found the hacks required to do it
to be rather ugly.
- gcc gurus (Dave :) might think what I'm doing with exceptions to be
too ugly^Wfragile. are there better ways to do it? :)
this is a somewhat compelling reason to write the whole thing in
assembly (which will also allow for a few more small optimizations).
do you think the advantages of maintaining C code outweigh the
slight performance penality and hacks required?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2004-09-10 0:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 0:00 [parisc-linux] [RFC] Optimi[zs]e copy_*_user routines Randolph Chung
2004-09-10 0:15 ` Randolph Chung [this message]
2004-09-10 14:04 ` Carlos O'Donell
[not found] ` <200409100656.i8A6u4hI026343@hiauly1.hia.nrc.ca>
2004-09-10 8:14 ` Randolph Chung
2004-09-10 8:46 ` John David Anglin
2004-09-16 19:18 ` Randolph Chung
[not found] ` <20040917144813.GH28936@baldric.uwo.ca>
2004-09-17 15:34 ` Randolph Chung
2004-09-17 16:23 ` Carlos O'Donell
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=20040910001557.GK28659@tausq.org \
--to=randolph@tausq.org \
--cc=parisc-linux@lists.parisc-linux.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