linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: mahesh gowda <aryamithra@yahoo.com>
To: Linux-mm@kvack.org
Subject: Trouble freeing pinned pages.
Date: Thu, 29 Apr 2004 05:27:41 -0700 (PDT)	[thread overview]
Message-ID: <20040429122741.95537.qmail@web21407.mail.yahoo.com> (raw)

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>

             reply	other threads:[~2004-04-29 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-29 12:27 mahesh gowda [this message]
2004-04-29 14:51 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040429122741.95537.qmail@web21407.mail.yahoo.com \
    --to=aryamithra@yahoo.com \
    --cc=Linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox