Messages in this thread | | | Date | Mon, 17 Dec 2001 10:32:12 +0100 (CET) | From | Martin Diehl <> | Subject | Re: zap_page_range in a module |
| |
On Fri, 14 Dec 2001, Benjamin LaHaise wrote:
> On Fri, Dec 14, 2001 at 01:26:29PM -0800, Sottek, Matthew J wrote: > > currently can only work when compiled into the kernel because I need > > zap_page_rage(). Is there an acceptable way for me to get equivalent > > functionality in a module so that this will be more useful to the > > general public? > > The vm does zap_page_range for you if you're implementing an mmap operation, > otherwise vmalloc/vfree/vremap will take care of the details for you. How > is your code using zap_page_range? It really shouldn't be.
True, but IMHO only for standard mmap semantics.
Well, the background is slightly different here, but very much the same problem: I'd like to get rid of some page(s) which are mapped to an userland vma. At certain points I need to force a page fault on this and so the overloaded vma->nopage() gets called and can do the right thing.
zap_page_range() does exactly what I want. IMHO zap_page_range() is some kind of symmetric buddy of remap_page_range() - it's somewhat surprizing to find one exported but not the other one. And, AFAICS, there is no technical reason as well, not to use it - at least for me it's working perfectly fine. Of course it needs proper mm serialization provided by down_write(&mm->mmap_sem).
Martin
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |