lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1217910505.24714.152.camel@koto.keithp.com>
Date:	Mon, 04 Aug 2008 21:28:25 -0700
From:	Keith Packard <keithp@...thp.com>
To:	John Stoffel <john@...ffel.org>
Cc:	keithp@...thp.com, Hugh Dickins <hugh@...itas.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Christoph Hellwig <hch@...radead.org>,
	Eric Anholt <eric@...olt.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM

On Mon, 2008-08-04 at 22:25 -0400, John Stoffel wrote:

> What about the onboard memory of graphics cards?  Isn't that where
> Textures and such are stored as well?  So once something is loaded to
> the card, shouldn't you be able to free it in system memory?  Or swap
> it out ahead of time?  

Right now, I'm working only on Intel integrated graphics, which doesn't
have any on-board memory. My thinking is that we'd best solve the
easiest case first before attempting the harder discrete graphics
driver. Plus, Intel pays me do do integrated graphics, so I have an
incentive.

Not that we haven't been thinking about how this plays with a discrete
card; we'll need to allocate backing store for any objects which are
placed in on-card memory in case we run out of on-card memory, and also
as a place to store objects when the system suspends. From the
perspective of shmem, it should be precisely the same; allocating
anonymous pages and handing them to the DRM driver to store video card
data.

> I just wonder here, since GPUs are different from other drivers in
> that (I assume) they are written too much more often than they are
> read to, that they should hopefully be much more amenable to drop
> behind semantics for pages they've been sent, to free system
> resources.

Yup, I think you understand the situation fairly well. I've got a big
pile of pages sitting idle in the GTT which could be pulled out and
given back to the system. I like to keep a bunch around as the cost of
getting pages out of the CPU cache and bound to the GTT is non-trivial,
but if there's any memory pressure, the cost to free them is quite low.

-- 
keith.packard@...el.com

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ