[AUUG-Talk]: Re: [BUGA] Sell me an Apple!

Gary R. Schmidt grschmidt at acm.org
Wed Mar 29 12:57:01 EST 2006


Quoting David Newall <davidn at rebel.net.au>:

> Gary R. Schmidt said:
> > Oh, it's _way_ beyond crap.  I just started working with it, my
> first
> > "Oh No!" is this - there is a Kernel Memory Allocation Zone where
> kernel
> > allocations greater than 8Kb go.
> >
> > Its size is calculated based on physical RAM, and it is *fixed*.
> 
> This sounds like some sort of buffer cache, and an assignation based
> on
> size of physical RAM sounds fair.  You can't really be paging these
> things; in fact they are probably used for paging, amongst many
> other
> purposes.  You don't want to fill RAM with it, if for no other reason
> than
> that yoy need some of that RAM for processes which, presumably, are
> creators and consumers of these kernel buffers.  Picking a fraction
> of RAM
> as an upper bound is one way of balancing competing needs, and who's
> to
> say it's wrong?  Not you, I'll wager.

Yes, me.  Well, when I explain it properly, you may see my point.  (I
will admit that I didn't do a good job in my original post)

There are two areas where kernel allocations are mode, one, over there
==> is for allocations of 8Kb and more, the other, over there <== is for
allocations less than 8Kb.

I need 10Kb, but there is no space in the >8 zone.  Bad luck.  There may
be 63Kb free in the <8 zone, and 32Kb of that is contiguous, but, bad
luck, you can't get it.

This is exacerbated by the behaviour of the kernel allocator.  I have
been told (so you may want to apply a grain of salt) that even when told
_not_ to wait for an allocation, the allocator will, on occasions,
choose to wait.  Of course, if enough of the allocated memory is being
used by the kext calling the allocator, it will wait until the cows come
home, if not longer.

> > When I was told about this, my reaction was an incredulous,
> "Apple's
> > programmers haven't learned /anything/ since 1986?!?!?!?!?"
> 
> I don't know to what you allude, but I was "there" in 1986, so I'm
> going
> to make some guesses.  Stop me if I go wrong.  1984 was when Apple
> showed
> us "why 1984 [wasn't] like 1984."  They gave us Macintosh.  It was a
> new
> platform in many ways, including what appeared at the time to be a
> ludicrously large address range, and Apple, in keeping with the
> habits
> they had adopted from day one, split that space according to various
> purposes; so much address space for ROM, so much for hardware I/O; so
> much
> for a frame buffer; and so on.  I'm guessing that the lessons they
> were
> supposed to have learned in 1986 all relate to that.  That doesn't
> seem to
> have much in common with "Kernel Memory Allocation Zones."
Well, what you have mentioned above seems to me to have a lot to do with
how you parcel out memory.  I could be wrong, however, it may be that
the shock of learning that all the time I'd spent developiong M68K code
in Exormacs was not going to be of much use on the Mac has deluded me.  :->

        Cheers,
                Gary    B-)





More information about the Talk mailing list