Re: Memory managment differences between 2.4 and 2.6 with mem=

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

 



On Fri, 10 Feb 2006, Serge Noiraud wrote:

> Hi,
> 	In 2.4 I used to have mem=2000 on a machine with 2GB of memory.
> I used the differences between 2000 and 2048 for a specific driver.
> This means I use addresses between 0x7d000000 and 0x7fffffff.
> I was sure the system did not take this memory.
>
> In 2.6 it does not work like that.
> In /proc/iomem the end of memory is 0x7d000000.
> I think this is normal.
>
> but I saw the IDE driver allocate 1KB in addresses between 0x7d000000 and
> 0x7d0003ff
>
> 	I have some question  :
> Is it normal ?
> If it is not, how to get the same functionality ? are there some new
> options ?
> Does memap= can help ?
> Is there any impact in the driver ?
>
> I red mel gorman "Understanding the Linux Virtual Memory Manager", but it does not help me.
> In which chapter this is explained ?
>
> --
> Serge Noiraud

Don't use a fixed address! When you load your driver, use the value
in the global, num_physpages, to find out how many pages the kernel
owns. Multiply that by PAGE_SIZE, then add one extra page. Use that
at the starting address for your private page to 'ioremap...'
In principle, you shouldn't have to add an additional page but
the last time I checked, something in the kernel scribbles beyond
the address-space it owns. Also, you should check to see if
some other driver owns the area you want to claim (request_mem_region).
If so, claim another. Remember to release it when unloading your
driver.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13.4 on an i686 machine (5589.66 BogoMips).
Warning : 98.36% of all statistics are fiction.
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux