On Mon, 2008-08-04 at 20:43 +1000, Nick Piggin wrote:We considered using anonymous pages, but as the user-mapping is not a feature, it seemed like it wasn't the right model. Plus, many of these objects need to be shared across multiple processes, so anonymous pages would be a pain there. Ok, that's useful information which isn't clear from the docs. That does look a lot more like what I want, as it returns an unlocked page. And, makes my code look cleaner to boot: inode =3D obj->filp->f_path.dentry->d_inode; mapping =3D inode->i_mapping; for (i =3D 0; i < page_count; i++) { page =3D read_mapping_page(mapping, i, NULL); if (IS_ERR(page)) { ret =3D PTR_ERR(page); DRM_ERROR("read_mapping_page failed: %d\n", ret); i915_gem_object_free_page_list(obj); return ret; } obj_priv->page_list[i] =3D page; } Does this look like it conforms to the vfs api? It appears to work when using shmem at least. Yup, I'm liking the general file mechanism, I used shmem only because that seemed like the obvious file system you'd want underneath these objects. --=20 keith.packard@intel.com
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
