fork and mmap

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

 



Hello,
I have the following problem. In the mmap of my device,I get a page
using get_free_page and then do mem_map_reserve on it. Say that my
user app forks and closes the file descriptor.
In the close routine, im supposed to clean up any pages that i may
have obtained. free_page should work only on unreserved pages,
shouldnt it? How do i decide when it is safe to unreserve the page and
free it? Do i look at the reference count of the file?
Why exactly is it necessary to reserve pages in the first place?What
if my memory was swapped out, as long as its swapped in
correctly..things should be fine, shouldnt it?

Thanks,
Sudharsan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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