Andrew Morton wrote: > Linus Torvalds wrote: > >> >> >>On Tue, 16 Nov 2004, David Howells wrote: >> >>>Do you have any objection to compound pages being made mandatory, even without >>>HUGETLB support? >> >>I haven't really looked into it, so I cannot make an informed decision. >>How big is the overhead? And what's the _point_, since we don't seem to >>need them normally, but the code is there for people who _do_ need them? > > > Yes, it's just the single pointer chase. Probably that's the common case > now, because everyone will be enabling hugepages on lots of architectures. > > But still, the non-compound code is well tested too, and leaving it in > place does make a little microoptimisation available to those who want it, > so I don't see a reason yet to make compound pages compulsory. > > So I'd suggest that we make compound pages conditional on a new > CONFIG_COMPOUND_PAGE and make that equal to HUGETLB_PAGE || !MMU. Good idea. BTW, any reason why the following (very)micro optimisation shouldn't go in? It currently only picks up a couple of things under fs/, but might help reduce other ifdefery around the place. For example mm.h: page_count and get_page.