linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Trouble freeing pinned pages.
@ 2004-04-29 12:27 mahesh gowda
  2004-04-29 14:51 ` Arjan van de Ven
  0 siblings, 1 reply; 2+ messages in thread
From: mahesh gowda @ 2004-04-29 12:27 UTC (permalink / raw)
  To: Linux-mm

We are developing a device driver on kernel version
2.4.21. We have a program in user-space that registers

a part of its virtual address space with our driver.
This memory may be anonymous or file backed.

In the driver, we translate the virtual addresses to 
physical pages and pin them down. We want to hold on 
to these pages even after the userspace program exits.

Our current approach is: 
Fault in the required pages using get_user_pages(), 
increment page reference count using get_page() and 
release the pages using put_page() when the driver 
unloads. But this is not working. The pages that we 
release seem to remain on the inactive list and never 
get freed. We have also attempted usig SetPageReserved
() and ClearPageReserved() in place of 
get_page/put_page. But that didn't help either. 

 Any ideas on debugging or getting this to work right
will be very helpful.

Please cc me on replies as i have not subscribed to 
the list.

Thanks,
Mahesh.


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trouble freeing pinned pages.
  2004-04-29 12:27 Trouble freeing pinned pages mahesh gowda
@ 2004-04-29 14:51 ` Arjan van de Ven
  0 siblings, 0 replies; 2+ messages in thread
From: Arjan van de Ven @ 2004-04-29 14:51 UTC (permalink / raw)
  To: mahesh gowda; +Cc: Linux-mm

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Thu, 2004-04-29 at 14:27, mahesh gowda wrote:
> We are developing a device driver on kernel version
> 2.4.21. We have a program in user-space that registers
> 
> a part of its virtual address space with our driver.
> This memory may be anonymous or file backed.


that sounds broken. But do you have a URL to your driver so that we can
have suggestions on how to fix it ?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-29 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29 12:27 Trouble freeing pinned pages mahesh gowda
2004-04-29 14:51 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox