Re: memory management issues

Peter Zijlstra <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <1178226216.2767.1.camel@lappy>
On Thu, 2007-05-03 at 14:47 -0500, James Bottomley wrote:
> 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 think this is best; if we were to go with a parisc specific API here,
all other arches that hit this will be in pain. Better fix their
flush_cache_page() if and when it really is a problem.

Ollie, how about posting this to lkml, and get some feedback, now that
its mostly complete.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.