OpenSolaris邮件列表中关于学习memory segmentation和paging的讨论
发表于:2007-06-08来源:作者:点击数:
标签:
转载自: OpenSolaris: code Memory ivanvdb Posts: 4 Registered: 6/21/05 Read Memory Posted: Jul 9, 2005 10:08 PM Click to reply to this thread Reply Hi, Does somebody know where I could find information about how segmentation and paging are
转载自:OpenSolaris: code
Memory
ivanvdb
Posts: 4
Registered: 6/21/05
Read Memory
Posted: Jul 9, 2005 10:08 PM
Click to reply to this thread Reply
Hi,
Does somebody know where I could find information about how segmentation and paging are implemented in OpenSolaris?
Thanks a lot!
With kindest regards,
Ivan
eschrock
Posts: 41
From: Menlo Park, CA
Registered: 3/21/05
Read Re: Memory
Posted: Jul 9, 2005 10:26 PM in response to: ivanvdb in response to: ivanvdb
Click to reply to this thread Reply
On Sat, Jul 09, 2005 at 07:08:23AM -0700, Ivan wrote:
> Hi,
>
> Does somebody know where I could find information about how segmentation and paging are implemented in OpenSolaris?
>
The easiest place to begin is by reading Solaris Internals
(www.solarisinternals.com), written by Jim Mauro and Rich McDougall.
While slightly out of date, the interfaces are largely unchanged today.
Once you've digested that, your next step should be the source code.
The code can be found in 'usr/src/uts/common/vm'. In particular, you
should start with 'page.h', 'seg.h', and 'as.h', all of which are
heavily commented.
If you want to get into the details of the HAT (hardware address
translation) layer, you should check out the architecture-specific
directories 'usr/src/uts/i86pc/vm' and 'usr/src/sfmmu/vm'. The x86 HAT
was written from scratch as part of the amd64 port, and is significantly
easier to understand than the SPARC version.
Hope that helps
- Eric
--
Eric Schrock, Solaris Kernel Development.
_______________________________________________
opensolaris-code mailing list
opensolaris-code at opensolaris dot org
https://opensolaris.org:444/mailman/listinfo/opensolaris-code
elowe
Posts: 6
From: Austin, TX
Registered: 3/21/05
Unread Re: Memory
Posted: Jul 11, 2005 8:18 PM in response to: eschrock in response to: eschrock
Click to reply to this thread Reply
On Sat, Jul 09, 2005 at 07:26:18AM -0700, Eric Schrock wrote:
| On Sat, Jul 09, 2005 at 07:08:23AM -0700, Ivan wrote:
| > Hi,
| >
| > Does somebody know where I could find information about how segmentation and paging are implemented in OpenSolaris?
| >
|
| The easiest place to begin is by reading Solaris Internals
| (www.solarisinternals.com), written by Jim Mauro and Rich McDougall.
| While slightly out of date, the interfaces are largely unchanged today.
|
| Once you've digested that, your next step should be the source code.
| The code can be found in 'usr/src/uts/common/vm'. In particular, you
| should start with 'page.h', 'seg.h', and 'as.h', all of which are
| heavily commented.
In particular you'll notice the paging code is really, really old and hasn't
been touched significantly in a long time, perhaps with the small exception of
the introduction of priority paging in Solaris 7/8.
| If you want to get into the details of the HAT (hardware address
| translation) layer, you should check out the architecture-specific
| directories 'usr/src/uts/i86pc/vm' and 'usr/src/sfmmu/vm'. The x86 HAT
| was written from scratch as part of the amd64 port, and is significantly
| easier to understand than the SPARC version.
For sure. If there are aspects of the SPARC HAT layer you want to know more
about shoot me mail and I'll cover those ... I plan to start adding more details
around the SPARC HAT layer to my blog soon, since it's a deep, dark corner
you really need a flashlight to venture into. ;)
--
Eric Lowe Solaris Kernel Development Austin, Texas
Sun Microsystems. We make the net work. x64155/+1(512)401-1155
_______________________________________________
opensolaris-code mailing list
opensolaris-code at opensolaris dot org
https://opensolaris.org:444/mailman/listinfo/opensolaris-code
gerhards
Posts: 19
Registered: 6/17/05
Unread Re: Memory
Posted: Jul 11, 2005 8:43 PM in response to: elowe in response to: elowe
Click to reply to this thread Reply
> In particular you'll notice the paging code is
> really, really old and hasn't
> been touched significantly in a long time,
Why is that? Does it work so well that nobody needs to touch it or is it so
fragile that nobody dares to touch it?
elowe
Posts: 6
From: Austin, TX
Registered: 3/21/05
Unread Re: Re: Memory
Posted: Jul 11, 2005 8:55 PM in response to: gerhards in response to: gerhards
Click to reply to this thread Reply
On Mon, Jul 11, 2005 at 05:43:35AM -0700, Gerhard S. wrote:
| > In particular you'll notice the paging code is
| > really, really old and hasn't
| > been touched significantly in a long time,
|
| Why is that? Does it work so well that nobody needs to touch it or is it so
| fragile that nobody dares to touch it?
These days, CPUs are SO fast compared to disk, that paging performance is pretty
much una
clearcase/" target="_blank" >cceptable no matter how well it works -- plus, there is the fact
that memory is cheaper to add than ever before. So this has never been seen
as a priority, and is something most users haven't asked for (they just buy
more RAM).
That said, there is some work planned in this area that will make the old
pageout code obsolete; since seek times are still slow, but disk transfer rates
are very high these days compared to when the whole wad was designed, the basic
idea is to make paging work more like swapping, so a whole process can be
brought in/out in just a few I/Os. But no matter what we do, with 2GHz CPUs
whenever the box starts paging it will still feel like you drove it off a cliff.
:)
--
Eric Lowe Solaris Kernel Development Austin, Texas
Sun Microsystems. We make the net work. x64155/+1(512)401-1155
_______________________________________________
opensolaris-code mailing list
opensolaris-code at opensolaris dot org
https://opensolaris.org:444/mailman/listinfo/opensolaris-code
joerg
Posts: 267
From: Berlin
Registered: 4/27/05
Unread Re: Re: Memory
Posted: Jul 12, 2005 1:15 AM in response to: elowe in response to: elowe
Click to reply to this thread Reply
Eric Lowe <Eric dot Lowe at Sun dot COM> wrote:
> On Mon, Jul 11, 2005 at 05:43:35AM -0700, Gerhard S. wrote:
> | > In particular you'll notice the paging code is
> | > really, really old and hasn't
> | > been touched significantly in a long time,
> |
> | Why is that? Does it work so well that nobody needs to touch it or is it so
> | fragile that nobody dares to touch it?
>
> These days, CPUs are SO fast compared to disk, that paging performance is pretty
> much unacceptable no matter how well it works -- plus, there is the fact
> that memory is cheaper to add than ever before. So this has never been seen
> as a priority, and is something most users haven't asked for (they just buy
> more RAM).
It is true that memory has become much cheaper now...
It is however not true that CPUs have become faster then disks.
During the past 20 years, the speed improvement of CPUs and disks has been
very similar.
CPUs have e.g. been too slow to do fast enough compression to beat disks
20 years ago and they still are not fast enough. The only diffrerence
between now and 20 years ago is that CPU speed now is more acceptable than
before.
Jörg
--
EMail:joerg at schily dot isdn dot cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling at fokus dot fraunhofer dot de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
opensolaris-code at opensolaris dot org
https://opensolaris.org:444/mailman/listinfo/opensolaris-code
原文转自:http://www.ltesting.net