From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
Subject: [Bug 39010] better handling of large pixmaps
Date: Tue, 20 Aug 2013 02:04:52 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1719046035=="
Return-path:
In-Reply-To:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Errors-To: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
List-Id: nouveau.vger.kernel.org
--===============1719046035==
Content-Type: multipart/alternative; boundary="1376964291.3E2b4211.32457"; charset="us-ascii"
--1376964291.3E2b4211.32457
Date: Tue, 20 Aug 2013 02:04:51 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=39010
--- Comment #8 from Ilia Mirkin ---
What's with the weird non-power-of-2 sizes?
Wouldn't it be better to have a target number of pixmaps to fit in vram, or
perhaps a percentage of vram that you're willing to take up with a single
pixmap? There are lots of cards with all sorts of quantities of memory (e.g.
there are 8800's with 320MB of RAM).
So once you determine a percentage, just have a list of sizes like
sizes = [8192, 4096, 2048]
for size in sizes:
if size * size * 4 < memory * 0.1:
return size
return 1024
(This is an example where I assume RGBA pixmaps, up to 10% of vram, but I
picked that at random... maybe other percentages would be more reasonable...
play around with the numbers. It certainly seems that we'd never want to allow
a pixmap that's bigger than VRAM, at the very least, which with current code,
there could be, if there were nv10+ with < 64MB of vram, which I'm pretty sure
I've seen with at least NV1A with 32M of stolen ram.)
[Note: please don't take this as an endorsement of the approach. In fact, I
thought TTM should be able to handle all that, but apparently not. This is just
a comment on improving your patch, irrespective of the overall approach.]
--
You are receiving this mail because:
You are the assignee for the bug.
--1376964291.3E2b4211.32457
Date: Tue, 20 Aug 2013 02:04:51 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Comment # 8
on bug 39010
from Ilia Mirkin
What's with the weird non-power-of-2 sizes?
Wouldn't it be better to have a target number of pixmaps to fit in vram, or
perhaps a percentage of vram that you're willing to take up with a single
pixmap? There are lots of cards with all sorts of quantities of memory (e.g.
there are 8800's with 320MB of RAM).
So once you determine a percentage, just have a list of sizes like
sizes = [8192, 4096, 2048]
for size in sizes:
if size * size * 4 < memory * 0.1:
return size
return 1024
(This is an example where I assume RGBA pixmaps, up to 10% of vram, but I
picked that at random... maybe other percentages would be more reasonable...
play around with the numbers. It certainly seems that we'd never want to allow
a pixmap that's bigger than VRAM, at the very least, which with current code,
there could be, if there were nv10+ with < 64MB of vram, which I'm pretty sure
I've seen with at least NV1A with 32M of stolen ram.)
[Note: please don't take this as an endorsement of the approach. In fact, I
thought TTM should be able to handle all that, but apparently not. This is just
a comment on improving your patch, irrespective of the overall approach.]
You are receiving this mail because:
- You are the assignee for the bug.
--1376964291.3E2b4211.32457--
--===============1719046035==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
--===============1719046035==--