Physical Memory Allocation?

Physical Memory Allocation?

Post by Juerg Haeflig » Thu, 06 Aug 1998 04:00:00



let's consider this scenario:

i have 2 SDIMM modules, each of which 32 MB. now i want linux to
use only *one* module. then i want to allocate the *other* module
from within my application and mess around with it.

how could that be done? using mmap? bigphysarea?

is it possible to tell which module (physically) i'm using
and which linux is using?
does the higher number of the SDIMM socket stand for higher physical
address of the memory?

if i use mem=32MB at boottime, is linux only using one module or are the
32 MB spread over both (which doesn't make a lot of sense, does it?).

thanks
...juerg

 
 
 

Physical Memory Allocation?

Post by Albert D. Cahal » Thu, 06 Aug 1998 04:00:00




Quote:> does the higher number of the SDIMM socket stand for higher physical
> address of the memory?

Maybe.

Quote:> if i use mem=32MB at boottime, is linux only using one module or are the
> 32 MB spread over both (which doesn't make a lot of sense, does it?).

Generally spread over both. It is a motherboard issue. I'd expect
to see alternating 4-byte chunks.

 
 
 

Physical Memory Allocation?

Post by Ignac » Fri, 07 Aug 1998 04:00:00




Quote:>let's consider this scenario:

>i have 2 SDIMM modules, each of which 32 MB. now i want linux to
>use only *one* module. then i want to allocate the *other* module
>from within my application and mess around with it.

Why?

Quote:>how could that be done? using mmap? bigphysarea?

Can't. Linux will take what it gets, possibly even grabbing part of
the second. Not being a kernel hacker, I'm not 100%, but...

Quote:>is it possible to tell which module (physically) i'm using
>and which linux is using?

Don't think so.

Quote:>does the higher number of the SDIMM socket stand for higher physical
>address of the memory?

Yes.

Quote:>if i use mem=32MB at boottime, is linux only using one module or are the
>32 MB spread over both (which doesn't make a lot of sense, does it?).

It's using the lower 32MB. Of course, the other one may not be
accessible at all...

Quote:>thanks
>...juerg


 
 
 

Physical Memory Allocation?

Post by Ignac » Fri, 07 Aug 1998 04:00:00






>Generally spread over both. It is a motherboard issue. I'd expect
>to see alternating 4-byte chunks.

No, DIMMS are 64 bits wide, hence no splitting. Alternating 8-byte
chunks however, may be possible.


 
 
 

Physical Memory Allocation?

Post by Peter Samuels » Fri, 07 Aug 1998 04:00:00



Quote:> No, DIMMS are 64 bits wide, hence no splitting. Alternating 8-byte
> chunks however, may be possible.

I don't know much about DIMMs, but I did notice while installing some
in an RS/6000 server (based on PPC 604e) recently that it needed them
installed in symmetric pairs, just like SIMMs.  And here I'd thought
the industry had managed to leave that part behind....

--
Peter Samuelson
<sampo.creighton.edu ! psamuels>

 
 
 

Physical Memory Allocation?

Post by Ignac » Fri, 07 Aug 1998 04:00:00





>> No, DIMMS are 64 bits wide, hence no splitting. Alternating 8-byte
>> chunks however, may be possible.

>I don't know much about DIMMs, but I did notice while installing some
>in an RS/6000 server (based on PPC 604e) recently that it needed them
>installed in symmetric pairs, just like SIMMs.  And here I'd thought
>the industry had managed to leave that part behind....

>--
>Peter Samuelson
><sampo.creighton.edu ! psamuels>

PPC 604es use a >128-bit< wide data path. Oh, well, so much for the
disappearance of the doubles :)


 
 
 

Physical Memory Allocation?

Post by Michael Appel » Sat, 08 Aug 1998 04:00:00


I'm really confused about that question. Isn't the physical memory mapped by
the page table to some logical space ? So who knows, whether that mapping is
contiguous behind
the page table ?

Any application should just see a logical space of whatever has been
declared and work with that. Or are U using special interface hardware to
play on the straight memory bus ?

Regards, Michael

begin 666 Michael Appelt.vcf

M96QT#0I%34%)3#M04D5&.TE.5$523D54.F%P<&5L=$!B97)L:6YH<2YC;VT-
M"D5-04E,.TE.5$523D54.F%P<&5L=$!B97)L:6XN<VYA9G4N9&4-"D5.1#I6
&0T%21 T*
`
end

 
 
 

Physical Memory Allocation?

Post by Bjorn Wese » Thu, 13 Aug 1998 04:00:00



>>i have 2 SDIMM modules, each of which 32 MB. now i want linux to
>>use only *one* module. then i want to allocate the *other* module
>>from within my application and mess around with it.
>>how could that be done? using mmap? bigphysarea?

>Can't. Linux will take what it gets, possibly even grabbing part of
>the second. Not being a kernel hacker, I'm not 100%, but...

For malloc etc yes. But if changing the kernel is ok, it's an easy fix to
pre-allocate a large defined physical area (like the top 32 MB) and then
write a syscall or two to let a user level program access it (or possibly
map it into its own memory area). Possibly you can do this using the mmap
method in /dev/kmem already, then you're home free, otherwise you might have
to hack a bit in that.

Quote:>>if i use mem=32MB at boottime, is linux only using one module or are the
>>32 MB spread over both (which doesn't make a lot of sense, does it?).

>It's using the lower 32MB. Of course, the other one may not be
>accessible at all...

As others have pointed out, this might not be true at all. If the
motherboard chipset finds it has two DIMMs to play with, it might decide to
do funky tricks with the adressing like interleaving etc. See the detailed
specs of the motherboard chipset to find out. However my guess is that they
don't - for the simple reason that the motherboard probably is as fast with
one DIMM as with two, and hence there would be no point in doing funky
tricks if two DIMMs are mounted.. but better check it than be sorry.

/Bjorn

 
 
 

1. Physical memory allocation?

I found the VM easily (vmstat) and quite frankly I think something is very
screwy; out of a 500MB swap slice, I only have 11MB free, thus making me
think KDE may have a memory leak.

I remember with sar from OSR saradm or the likes (Hm, seems my memory is
failing me) could be used to an extent to get an idea on the memory
utilisation.

Is it the same story under S8?
--

Wayne M Jackson
http://www.users.bigpond.net.au/warp_kez

Inter Arma Enim Silent Leges - Marcus Tullius Cicero
In time of War, the law falls silent

2. Incorrect Linux version at bootup?

3. Physical memory allocation

4. Aztech CD-ROM does not mount with 2.0.20

5. Optimizing physical memory allocation

6. Media Vision 3D sound card & Sony cu31a CDROM

7. allocation contiguos physical memory

8. Problems with Apache/SSL/ssleay on redhat 5.2

9. Physical vs. virtual memory allocation.

10. Memory allocation and de-allocation

11. Physical memory versus detected memory 2.4.7-10

12. mmap, virtual memory, physical memory

13. Real Memmory /Virtual Memory /Physical Memory Accountancy.