lkml.org 
[lkml]   [2008]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM
From
Date
On Mon, 2008-08-04 at 20:55 +0100, Hugh Dickins wrote:

> Okay, thanks for the warning. It sounds like the shrinker will be
> important, but we'll also need to mark those pages as unevictable
> while they're unshrunk.

That seems like a sensible optimization; otherwise the system could
spend quite a bit of time wandering over these pages.

> (Usually when drivers grab a large number
> of pages, they're not on any LRU to begin with: you're being nice
> by choosing swappable LRU pages - in the tmpfs case - but enough
> to upset the balance while they're not swappable.)

It's not a matter of 'being nice', of course, it's a matter of keeping
the system running under heavy firefox load. Check out the memory usage
by your X server with numerous tabs open to image-heavy pages someday.
Not making those pageable would result in OOM visiting far too often.

Right now, we make these images pageable by copying them in and out of a
set of pages bound permanently to the GTT. The performance implications
of doing that are fairly severe, enough so that in many cases it's
better to just use the CPU for most rendering.

> Offhand I can't
> say what will be the appropriate way to do that, it's something we
> need to revisit later (from your point of view it should amount to
> one function call or flag set somewhere, not any grand redesign).

Ok, cool. I haven't added the shrinker support yet in any case, although
that doesn't look like a big job.

--
keith.packard@intel.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-08-04 23:43    [W:0.781 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site