On Thu, May 28, 2020 at 07:01:39PM +0800, hui yang wrote: > From: YangHui <yanghui.def@xxxxxxxxx> > > if pte_alloc_one failed alloc a page, do_fault_around will return 0. > and it will come into __do_fault(), it also pte_alloc_one a page. > in __do_fault and do_fault_around, pte_alloc_one did the same thing, > if do_fault_around alloc page filed,we just let it return. there is > no need to come into __do_fault to do repetitive pte_alloc_one. This really isn't "Reduce code complexity" though. It's "Fail early when memory allocation fails". And, honestly, I don't see the point of doing this. You've optimised an incredibly rare failure path.