Re: memory management issues
James Bottomley <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2007-05-03 at 10:55 -0700, Ollie Wild wrote: > This doesn't work because we're copying between two different > mm_struct's. Since we can't have both active at the same time, we > need to setup some sort of temporary mapping. > > I could maybe check the vma boundaries and create new pages in the > kernel, but I still need to assign them to the process space to make > them swappable. Since some binfmt's remove args, I'll also > potentially need to reload old pages, which means copy_strings() will > still need to call get_user_pages() to retrieve potentially swapped > out pages. OK, then you'll just have to go with flush_cache_page() ... it should be reasonably efficient on parisc since I modified it to do non-current flushing (which is really what you're doing). However, you should be aware that the original parisc implementation threw up its hands and flushed the entire cache if it found a non-current page ... so if any other architecture still does that, it will be remarkably inefficient for you ... I could give you an API on parisc to copy from one user process to another via the user cache (which would avoid the coherence issues) but I'm not sure it would necessarily be portable to other architectures. James