On Tue, Apr 21, 2009 at 07:49:37PM +0800, yihect wrote: > >> Hi, all: > >> I allocated some physical pages using __get_free_pages() api and > >> mapped them into user-space with mmap() in my driver, > >> but It seems not be shared in multi process. > >> > >> Following is content of /proc/157/maps file. The vma range of > >> 40244000-40444000 mapped to /dev/mux_dev, notice the rw-p column. > > Note that p stands for private (copy on write). That does not mean the pages > > can't be shared by multi processes. > > En, How to share these physical pages in driver??? Memory share is designed to used by different user space processes. You want to communication between your user space APP and your driver? There are many interfaces between user space and you driver in kernel space like ioctl.
> > >Initially multi processes will map their > > pages to the same physical memory. And the physical pages will be copied > > once > > some guy writes data to the page. > > If we want to share these pages, Is this means that we must disable > COPY-ON-WRITE ? > and how to disable this behavior. > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to [email protected] Please read the FAQ at http://kernelnewbies.org/FAQ
