> > It's odd that just checking if some pages are huge should be that > > expensive, but ok .. > > Yeah, I was surprised as well but profiles were pretty clear on this - part > of the slowdown was caused by loads of page->_compound_head (PageTail() > and page_compound() use that) which we previously didn't have to load at > all, part was in hpage_nr_pages() function and its use. A strategic early prefetch may help. -Andi