> >>- regions that are marked as "preserve" have a matching backing store
> >>region in system ram. That region is made of pinned pages.
> >
> > Do they really need to be pinned? That's a huge waste of memory.
>
> We had this discussion too.  The problem is you need the memory
> allocated in advance to avoid the allocation failures when the kernel
> needs to back up the data.  If the memory isn't pinned, it can get paged
> out, and, apparently, the kernel can page-in user pages in the way that
> we want.  Dave Airlie made some comments about that, but I don't
> remember exactly what he said.

I've thought a bit more and I think you have a couple of choices.

1. pin the memory into a process address space (bad.)
2. make the memory shared and maybe have a controlling app that can
re-page it back into its address space and write the pages out to it,
(sounds slow if you are doing a lot of app switching)
3. Well if the app is keeping the memory around why not just make it back
it up on lock drop?? (slow...)

Dirty tricks abound, I can think of doing something with ptrace maybe...

Dave.

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
Linux kernel - DRI, VAX / pam_smb / ILUG



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to