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

Facing problems in reserving pages



Hi,

	My driver ( loadable ) requires following 

1) To be able to lock the pages in main
   memory and ioremap it as uncached.
   
   This has to be done when init_module is called

2) To lock the pages in memory, need not be noncachable.
   This has to done when device is opened, and unlocked 
   and released when the device is releases.


	I am using kernel version 2.2.14 as this is a stable 
version.

I am doing in this way.
This does not seem to work.
There were some oops in file_read_ahead function.
( if any one has time i will send ) 
------------------------------------------------------------

Allocating 

1) use __get_free_pages for memory
   set the flags of these pages in mem_map as PG_reserved.

2) use __get_free_pages for memory 

   increment count varable in mmap
   set the flag of these pages to PG_locked 
   
Freeing

1) remove reseerved bit.
   free page
2) decrese count 
   free page
   call wait queue


can any one help me how to do this???

- muni

-
Linux-mm-www: builders list for the Linux-MM website
Archive:      http://humbolt.nl.linux.org/lists/
Web site:     http://www.linux.eu.org/Linux-MM/