Re: Query regarding physically discontiguous memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Dec 25, 2013 at 9:07 PM, <Valdis.Kletnieks@xxxxxx> wrote:
On Wed, 25 Dec 2013 14:45:01 +0530, Pritam Bankar said:

> This is what I don't understand what does it mean by
>
> containing large holes?
>
> physical discontiguous memory?
>
> Is it like when I put 2 RAM chips in a system then memory for them will be
> discontiguous?

> Per my understanding RAM memory will ALWAYS be contiguous whether its 512
> MB or 4 GB.

Your understanding is wrong.  That may be true on most x86-based desktops
and laptops and the like, but it's often very wrong on other architectures.
In fact, given that the x86 architecture is just one of like 27 archs that
Linux supports, it's a good bet that there's more archs that *don't* enforce
contiguous memory than do. Counting through the defconfigs to get a number
is left as an exercise for the student. :)

A common case for embedded systems is "256M of RAM at address 0, and
256M of RAM at address 0x80000000" (or whatever the halfway mark for the
architecture is).

NUMA boxes are sometimes "each node's RAM is at <node number>*4G" or similar,
which means lots of holes if each node is partly populated with only 2G.


Thanks a lot Saptarshi and Valdis. Your comments cleared my doubt but while doing some more analysis I have come with following points.

Following is a output of /proc/iomem on my system

*****************************************************************************
[pritam@linux-box-1 ~]$ cat /proc/iomem
00000000-0009fbff : System RAM
  00000000-00000000 : Crash kernel
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000c8000-000c97ff : Adapter ROM
000c9800-000cafff : Adapter ROM
000f0000-000fffff : System ROM
00100000-3ffeffff : System RAM
  00400000-005fed40 : Kernel code
  005fed41-006d292f : Kernel data
3fff0000-3fffefff : ACPI Tables
3ffff000-3fffffff : ACPI Non-volatile Storage
fc900000-fc9fffff : PCI Bus #01
  fc9b0000-fc9bffff : 0000:01:05.1
    fc9b0000-fc9bffff : tg3
  fc9e0000-fc9effff : 0000:01:05.0
    fc9e0000-fc9effff : tg3
fca00000-feafffff : PCI Bus #03
  fd000000-fdffffff : 0000:03:04.0
  feac0000-feadffff : 0000:03:04.0
  feafd000-feafdfff : 0000:03:00.1
    feafd000-feafdfff : ohci_hcd
  feafe000-feafefff : 0000:03:00.0
    feafe000-feafefff : ohci_hcd
  feaff000-feafffff : 0000:03:04.0
febfe000-febfefff : 0000:00:0a.1
febff000-febfffff : 0000:00:0b.1
ff500000-ff5fffff : PCI Bus #01
ff780000-ffffffff : reserved  
******************************************************************************

PCMIIW,

1. From above output it is clear that System RAM is discontinuous. I calculated addresses in both sections assigned to System RAM (highlighted in above output) and they are of 1024 MB which is exactly my systems physical RAM is. 

2. But for other IO devices lets say Video RAM,  area is 000a0000-000bffff Now who has assigned these addresses?  Do they remain same forever ? How kernel comes to know that there is no RAM at 000a0000-000bffff but its Video RAM?


Thanks,
Pritam

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux