[PATCH] Fix up compiler inefficiencies
Oh, bugger... The recent mmzone.h change triggered some very, very ugly things in next_zone(), is_highmem(), is_normal() and zone_idx() because it changed the size of "struct zone" subtly. Pointer subtraction is no fun when sizeof of object gets weird and poor gcc blows its brains out trying to optimize that... This slowed down an ARM cross-build by a factor of 2.5. Turn the pointer subtraction tests into pointer addition tests instead where possible, making them trivial to deal with (and gets better code, in addition to faster compile). zone_idx() still does a subtraction.
Showing
Please register or sign in to comment