[Intel-gfx] [RFC 2/2]libdrm: tell kernel which gem_bo is clean

Jesse Barnes jbarnes at virtuousgeek.org
Thu Jun 18 23:57:38 CEST 2009

On Thu, 11 Jun 2009 14:45:32 +0800
Shaohua Li <shaohua.li at intel.com> wrote:

> libdrm tells kernel which gem_bo is clean. When kernel tries to
> truncate object's pages, it might unmap object's mapping. To avoid
> the confusion, we unmap bo_gem first.

We desperately need some sort of bo cache management.  On my machine,
under normal desktop usage (just compiz and a few non-3D apps open) I
have over 1G of GEM objects lying around, taking up most of my swap
space.  And with 2.6.31 from git, my machine will OOM fairly easily,
and I think the bo cache is at least partly to blame.

Any chance we can get something like your patch included in 2.6.31,
Shaohua?  Looks like it still needs to be hooked to the shrinker, and
have some printks removed...

I'm currently running with an old libdrm, so I'm not sure if some of
the recent changes to improve its cache management will help, but being
more aggressive about trimming the cache sure seems like a good idea...

Jesse Barnes, Intel Open Source Technology Center

More information about the Intel-gfx mailing list