On Mon, 4 Aug 2008, Keith Packard wrote:Could, yes, but should? I wouldn't presume to answer with any authority. Well, I guess put the check on ->readpage into your code for now, and by the time GEM gets into Linus's tree, we should have -EINVAL checks on NULL filler() in __read_cache_page() and read_cache_page_async(), so remove check at your end before final submission. (You could leave it there, and strictly we ought to update GEM if we make any change to our implementation; but it is the kind of detail that gets overlooked - witness the way I failed to grasp the readahead side-effects of adding ->readpage into tmpfs until recently. I'm just afraid we'd break you unwittingly: better not, though easily fixed.) I'm not sending the patch right now, waiting to see if this direction wins general favour. I think you should drop the mark_page_accessed(): that's done in read_cache_page_async() as part of the initial read_mapping_page(). But do it again when releasing if you think there's a good chance that object will be wanted again shortly. set_page_dirty() if modified by GPU, yes, that would still be needed. For how long are these objects' pages pinned in memory like this? I ask because Rik & Lee have patches in -mm, trying to avoid long scans of LRUs cluttered with unevictable pages. I've no idea whether you're adding a lot or a little to that problem. Hugh --
| Linus Torvalds | Linux 2.6.21-rc2 |
| Andrew Morton | 2.6.22-rc4-mm1 |
| David Miller | [GIT]: Networking |
| Andrew Morton | -mm merge plans for 2.6.23 |
git: | |
| Stephen Hemminger | Re: [PATCH] bonding: allow bond in mode balance-alb to work properly in bridge |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | [GIT]: Networking |
