Re: [patch] mm: pageable memory allocator (for DRM-GEM?)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Wednesday, September 24, 2008 - 5:18 pm

On Tue, Sep 23, 2008 at 12:21:26PM +0200, Thomas Hellström wrote:

Ah, interesting... freeing/recreating isn't _too_ expensive, but it is
going to have to allocate a lot of pages (for a big object) and copy
a lot of memory. It's strange to say "cleaned", in a sense, because the
allocator itself doesn't know it is being used as a writeback cache ;)
(and it might get confusing with the shmem implementation because your
cleaned != shmem cleaned!).

I understand the operation you need, but it's tricky to make it work in
the existing shmem / vm infrastructure I think. Let's call it "dontneed",
and I'll add a hook in there we can play with later to see if it helps?

What I could imagine is to have a second backing store (not shmem), which
"dontneed" pages go onto, and they simply get discarded rather than swapped
out (eg. via the ->shrinker() memory pressure indicator). You could then
also register a callback to recreate these parts of memory if they have been
discarded then become used again. It wouldn't be terribly difficult come to
think of it... would that be useful?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] mm: pageable memory allocator (for DRM-GEM?), Nick Piggin, (Tue Sep 23, 2:10 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Thomas Hellström, (Tue Sep 23, 3:21 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Jerome Glisse, (Tue Sep 23, 4:31 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Christoph Lameter, (Tue Sep 23, 6:18 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Tue Sep 23, 8:50 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Jerome Glisse, (Tue Sep 23, 11:29 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Nick Piggin, (Wed Sep 24, 5:18 pm)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Wed Sep 24, 6:20 pm)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Wed Sep 24, 7:43 pm)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Wed Sep 24, 11:16 pm)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Thomas Hellström, (Thu Sep 25, 12:19 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), KAMEZAWA Hiroyuki, (Thu Sep 25, 1:45 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Thu Sep 25, 7:38 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Thomas Hellström, (Thu Sep 25, 8:39 am)
Re: [patch] mm: pageable memory allocator (for DRM-GEM?), Keith Packard, (Thu Oct 2, 10:17 pm)