On 3/10/20 3:34 AM, qiwuchen55@xxxxxxxxx wrote: > From: chenqiwu <chenqiwu@xxxxxxxxxx> > > Simplify page_is_buddy() to reduce the redundant code for better code > readability. > > Signed-off-by: chenqiwu <chenqiwu@xxxxxxxxxx> I would personally keep testing the page type first, and even switch it so that PageBuddy is tested before page_is_guard (but it only matters on debugging kernels). I can only speculate which will have better performance (if any), but it's more logical to test the type first. Both orders should be safe though as we have the zone lock.