On Thu, Oct 15, 2020 at 02:20:36PM -0700, Ankur Arora wrote: > The case I was thinking of was that clear_huge_page() That loop in clear_gigantic_page() there could be optimized not to iterate over the pages but do a NTA moves in one go, provided they're contiguous. > or faultin_page() would faultin_page() goes into the bowels of mm fault handling, you'd have to be more precise what exactly you mean with that one. > know the size to a page unit, while the higher level function would know the > whole extent and could optimize differently based on that. Just don't forget that this "optimization" of yours comes at the price of added code complexity and you're putting the onus on the people to know which function to call. So it is not for free and needs to be carefully weighed. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette