Re: What I suspect

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 8 Dec 1999 11:49:36 +0100 (MET)


Linus Torvalds wrote:
> So I've considered having a magic user-mapped page for quite some time,
> because we have several of these cases where the kernel can generate code
> at run-time to its own advantage. The sysenter thing is just an obvious
> extension to this - allowing the kernel to generate whatever entry
> sequence is the best for that particular CPU.

Talking about "magic user-mapped pages": Some things like "getpid ()"
are horrendously more inefficient than they need be. If there was a
magic kernel-page that the user-app has read access to, then these
calls would become enormously more efficient.

On the other hand, it is hardly likely that an application will notice
a performance hit due to the (relative) slowness of getpid.

There would be two different pages mapped: One with process-centered
info. pid, ppid, ruid, euid, fsuid, rgid, egid, pgid?, pgrp?, rlimit?
rusage, sid?, priority_max, times. Some of these are not static, and
the "rest of the kernel" will have to be modified to maintain these
parameters "in place" on the page that the program has read-access to.

The other would be one with system info: hostname, domainname, time
etc etc (I'm too lazy right now to run through the whole list of
syscalls again.)

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
 "I didn't say it was your fault. I said I was going to blame it on you."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/