Re: doubt about ZONE_HIMEM

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

 



On Mon, 2007-04-09 at 10:38 +0300, Tzahi Fadida wrote:
> Hi,
> Please CMIIW.
> On 32bit systems:
> Regarding ZONE_HIMEM which is 128MB virtual memory in size.
> With kmap you can address using this 128MB of virtual memory, any physical 
> memory from 0-4GB that is not used by ZONE_DMA and ZONE_NORMAL.
> However, i am not sure why you would want to address this whole 0-4GB range 
> and not a predetermined 128MB physical range since different devices in the 
> kernel can only use the same 128MB (it is not replaced as with processes when 
> there is a context switch). I.e., a device has to release the memory almost 
> immediately and certainly before another device needs that memory.

  I am not sure if i understood u properly, still i will try n explain
the scenario. Well the last 128MB of the virtual memory is used by the
kernel to map-do_some_work-unmap sequence.As in a new process might as
well be allocated memory which is beyond 1GB in physical range for
example. But user mode mappings (i.e. address 0x0 - 0xBFFFFFFF) mappings
can be created for the process easily for the higher physical memory.
The problem occurs when this process issues a system call, and the
kernel needs to access the process's phys memory which is allocated
beyond 1GB (physically). This is when the kernel uses last 128MB of his
virtual memory, and temperarily maps the area of the process it needs to
work with and unmaps it immediately, so as to release the address range
in last 128MB. This is just one of the many examples how HIGH_MEM is
handled.

> I can only guess that the reason is some weird devices that can only access 
> specific physical memory ranges for DMA transfers. Though, what happens if a 
> process captured that range? it would have to be vacated first to be mapped 
> to.

    didnt get what u mean...

> Plus, how ZONE_HIMEM applies when you have under 896MB, over 896MB and 4GB 
> RAM, does it even matter? can a mapped ZONE_HIMEM physical memory be swapped?
> As i understand it, if RAM is under 896MB, since ZONE_NORMAL uses logical 
> mappings it will mean the ZONE_NORMAL will be lower than 896MB, how much is 
> determined how? and ZONE_HIMEM, perhaps non-existant?
> 
	There wont be ZONE_HIGHMEM for phys memory <896MB and if you have
anything more that that... its HIGH MEM. And page frames above 896
MB(i.e. who are supposed to be in HIGHMEM region) can be swapped out,
coz they can easily be in a process address space ..right???

i hope this helps,

cheers,
sandeep


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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