1 Dec 2008 02:18
Re: [patch 1/2] mm: pagecache allocation gfp fixes
Hugh Dickins <hugh <at> veritas.com>
2008-12-01 01:18:09 GMT
2008-12-01 01:18:09 GMT
On Fri, 28 Nov 2008, Nick Piggin wrote: > On Thu, Nov 27, 2008 at 06:14:18PM +0000, Hugh Dickins wrote: > > On Thu, 27 Nov 2008, Nick Piggin wrote: > > > On Thu, Nov 27, 2008 at 11:52:40AM +0200, Pekka Enberg wrote: > > > > > - err = add_to_page_cache_lru(page, mapping, index, gfp_mask); > > > > > + err = add_to_page_cache_lru(page, mapping, index, > > > > > + (gfp_mask & (__GFP_FS|__GFP_IO|__GFP_WAIT|__GFP_HIGH))); > > > > > > > > Can we use GFP_RECLAIM_MASK here? I mean, surely we need to pass > > > > __GFP_NOFAIL, for example, down to radix_tree_preload() et al? > > > > I certainly agree with Pekka's suggestion to use GFP_RECLAIM_MASK. > > > > > > > > Updated patch. > > > > I'm not sure about it. I came here before 2.6.25, not yet got around > > to submitting, I went in the opposite direction. What drove me was an > > irritation at the growing number of & ~__GFP_HIGHMEMs (after adding a > > couple myself in shmem.c). At the least, I think we ought to change > > those to & GFP_RECLAIM_MASKs (it seems we don't have one, but can > > imagine a block driver that wants GFP_DMA or GFP_DMA32 for pagecache: > > there's no reason to alloc its kernel-internal data structures for DMA). > > > > My patch went the opposite direction to yours, in that I was pushing > > down the GFP_RECLAIM_MASKing into lib/radix-tree.c and mm/memcontrol.c > > (but that now doesn't kmalloc for itself, so no longer needs the mask). > > > > I'm not sure which way is the right way: you can say I'm inconsistent > > not to push it down into slab/sleb/slib/slob/slub itself, but I've a(Continue reading)
RSS Feed