On Tue, Feb 07, 2012 at 10:27:56AM -0600, Christoph Lameter wrote: > On Mon, 6 Feb 2012, Mel Gorman wrote: > > > Pages allocated from the reserve are returned with page->pfmemalloc > > set and it is up to the caller to determine how the page should be > > protected. SLAB restricts access to any page with page->pfmemalloc set > > pfmemalloc sounds like a page flag. If you would use one then the > preservation of the flag by copying it elsewhere may not be necessary and > the patches would be less invasive. Using a page flag would simplify parts of the patch. The catch of course is that it requires a page flag which are in tight supply and I do not want to tie this to being 32-bit unnecessarily. > Also you would not need to extend > and modify many of the structures. > Lets see; o struct page size would be unaffected o struct kmem_cache_cpu could be left alone even though it's a small saving o struct slab also be left alone o struct array_cache could be left alone although I would point out that it would make no difference in size as touched is changed to a bool to fit pfmemalloc in o It would still be necessary to do the object pointer tricks in slab.c to avoid doing an excessive number of page lookups which is where much of the complexity is o The virt_to_slab could be replaced by looking up the page flag instead and avoiding a level of indirection that would be pleasing to an int and placed with struct kmem_cache I agree that parts of the patch would be simplier although the complexity of storing pfmemalloc within the obj pointer would probably remain. However, the downside of requiring a page flag is very high. In the event we increase the number of page flags - great, I'll use one but right now I do not think the use of page flag is justified. -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>