From: ralf@uni-koblenz.de
To: "William J. Earl" <wje@fir.engr.sgi.com>
Cc: Greg Chesson <greg@xtp.engr.sgi.com>,
David Chatterton <chatz@omen.melbourne.sgi.com>,
Lige Hensley <ligeh@carpediem.com>,
Chris Carlson <cwcarlson@home.com>,
linux@cthulhu.engr.sgi.com
Subject: Re: Linux on the O2
Date: Fri, 5 Dec 1997 02:33:16 +0100 [thread overview]
Message-ID: <19971205023316.12386@uni-koblenz.de> (raw)
In-Reply-To: <199712042333.PAA27062@fir.engr.sgi.com>; from William J. Earl on Thu, Dec 04, 1997 at 03:33:01PM -0800
On Thu, Dec 04, 1997 at 03:33:01PM -0800, William J. Earl wrote:
> > Indeed - and you're pointing to what I consider _the_ problem with
> > current Linux kernels. Linux uses the ``buddy system'' described by
> > Donald Knuth's ``Algorithems And Data Structures'' to maintain it's
> > free pages. This algorithem results in massive fragmentation even
> > after a short uptime.
>
> Are you saying that linux uses the buddy system for all of memory,
> or just for the kernel heap? (I would be surprised if it were used
> for other than the kernel heap, although that is bad enough.)
The buddy system is only used to maintain the pool of free pages. The
buddy system has the advantage that it is very fast. On top of this
lowest level we've got additional layers:
- The ``slab allocator''. It's basically what Jeff Bonwick from Sun
describes in his USENIX paper from '94. Miguel has the paper on his
homepage. The slab allocator has been added during the Linux 2.1.x
series.
- The ``simp allocator''. Yet another memory allocator for cached objects
that has been added during 2.1.x. Pretty fast and still under
development.
- kmalloc() is the kernel equivallent to malloc(3). It's mostly used
for allocations smaller than a single page but can be used to allocate
upto 128kb. For Linux 2.0 kmalloc() is getting it's pages directly from
the free page pool. For Linux 2.1.x kmalloc is implemented on top of
the slab allocator.
Both implementations are directly or indirectly getting the memory from
the pool of free pages (that's KSEG0 on MIPS), therefore have to
live with the advantages and disadvantages of the buddy system.
> One thing we do in IRIX is to always allocate kernel heap buffers
> of 1 page or larger as an integral set of pages, mapped into kernel
> virtual space, but not part of the main kernel heap (which is used only
> for smaller buffers). Except for fragmentation of the kernel mapped
> space pool (a pool of address space, not real memory), this guarantees
> you can always get large buffers if pages are available. Fragmentation
> of smaller buffers of course requires a better heap manager, although
> using zone allocation (where a zone has blocks all of the same size,
> and there are zones for most popular sizes) helps a lot and is also
> faster than using the regular heap manager.
Actually we also have this type of kernel virtual memory in Linux. On
MIPS the address space >=KSEG2 is being used for that purpose. The
functions vmalloc(9) and vfree(9) are used for that purpose. However
vmalloc is rarely being used in the kernel. Among the reasons is that
vmalloc() is slower than other types of memory allocation. Furthermore
the primitive PC-style DMA hardware often does not have the required
support to use vmalloc'ed memory as scatter/gather buffer. Finally
accessing vmalloced memory may result in TLB reloads on some architectures
while pages allocated from the pool of free pages don't. So accessing
vmalloced memory may imply a performance penalty.
> We (the SGI people on the list) will have to talk with the
> general manager for the O2 platform. I personally think that would be
> ok. As I mentioned in my earlier message, a lot of the IRIX value
> added for O2 is in essentially generic facilities, not in the
> device-dependent drivers, and we already tell customers in high level
> terms about the overall architecture (such as the unified memory for
> graphics and I/O), so there is not much in the hardware documentation
> which needs to be treated as a trade secret. Conceptually, the O2 graphics
> pipeline is fully described by the OpenGL reference (software) implementation
> and specification, so the hardware value added is in the internals
> of the implementation, not in the interface (which is essentially
> a large part of the OpenGL pipeline).
Well, sounds good. You're making the differenciation between the interface
and the implementation of the O2, something that so far people I've been
discussing with haven't done. As a software guy all need is the
interface and maybe a peek into internals for a better understanding of
the interface.
Ralf
next prev parent reply other threads:[~1997-12-05 2:12 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-12-02 21:50 Linux on the O2 cypher
1997-12-02 22:10 ` Ralf Baechle
1997-12-02 22:31 ` Ariel Faigon
1997-12-02 22:31 ` Ariel Faigon
1997-12-03 0:04 ` Alan Cox
1997-12-03 0:46 ` John Wiederhirn
1997-12-03 3:06 ` William J. Earl
1997-12-03 3:06 ` William J. Earl
1997-12-03 18:28 ` cypher
1997-12-03 1:51 ` Douglas F. Elznic
1997-12-03 1:51 ` Douglas F. Elznic
1997-12-03 7:01 ` ralf
[not found] ` <Pine.LNX.3.95.971203132942.15095B-100000@vertigo.cs.indian a.edu>
1997-12-03 18:04 ` Douglas F. Elznic
1997-12-03 18:39 ` Alan Cox
1997-12-03 18:39 ` Alan Cox
1997-12-03 18:42 ` cypher
1997-12-03 18:49 ` cypher
1997-12-03 18:05 ` David Chatterton
1997-12-03 2:34 ` Brendan Black
1997-12-03 2:58 ` Richard Offer
1997-12-03 3:19 ` Douglas F. Elznic
1997-12-03 8:21 ` Oliver Frommel
1997-12-03 10:51 ` Alan Cox
1997-12-03 10:51 ` Alan Cox
1997-12-03 18:32 ` cypher
1997-12-03 18:31 ` cypher
1997-12-03 21:19 ` Warner Losh
1997-12-03 22:16 ` Chad Campbell
1997-12-03 22:31 ` William J. Earl
1997-12-03 22:48 ` Alan Cox
1997-12-03 22:48 ` Alan Cox
[not found] ` <Pine.LNX.3.95.971203161250.15277A-100000@dv123s34.lawrence .ks.us>
1997-12-03 22:38 ` Douglas F. Elznic
1997-12-02 22:33 ` William J. Earl
1997-12-02 23:32 ` Christian Reisch
1997-12-02 23:45 ` William J. Earl
1997-12-03 0:09 ` Alan Cox
1997-12-03 0:09 ` Alan Cox
1997-12-03 7:46 ` Chris Carlson
1997-12-04 5:39 ` Lige Hensley
1997-12-04 5:39 ` Lige Hensley
1997-12-04 5:48 ` David S. Miller
1997-12-04 16:55 ` Greg Chesson
1997-12-04 16:51 ` Greg Chesson
1997-12-04 22:08 ` David Chatterton
1997-12-04 14:06 ` Lige Hensley
1997-12-04 17:03 ` Greg Chesson
1997-12-04 17:22 ` William J. Earl
1997-12-04 18:59 ` Alan Cox
1997-12-04 18:59 ` Alan Cox
1997-12-04 22:01 ` ralf
1997-12-04 23:33 ` William J. Earl
1997-12-05 1:33 ` ralf [this message]
1997-12-05 3:25 ` Chad Campbell
1997-12-04 18:54 ` Alan Cox
1997-12-04 18:54 ` Alan Cox
1997-12-04 19:41 ` Alex deVries
1997-12-04 22:28 ` Eric Kimminau
1997-12-04 22:44 ` Alan Cox
1997-12-05 0:17 ` ralf
1997-12-05 9:06 ` Alan Cox
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=19971205023316.12386@uni-koblenz.de \
--to=ralf@uni-koblenz.de \
--cc=chatz@omen.melbourne.sgi.com \
--cc=cwcarlson@home.com \
--cc=greg@xtp.engr.sgi.com \
--cc=ligeh@carpediem.com \
--cc=linux@cthulhu.engr.sgi.com \
--cc=wje@fir.engr.sgi.com \
/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