Messages in this thread | | | Date | Wed, 29 Aug 2018 22:34:32 +0200 | From | Oscar Salvador <> | Subject | Re: [PATCH] mm/page_alloc: Clean up check_for_memory |
| |
On Tue, Aug 28, 2018 at 02:35:30PM -0700, Andrew Morton wrote: > > First, we should only set N_HIGH_MEMORY in case we have > > CONFIG_HIGHMEM. > > Why? Just a teeny optimization?
Hi Andrew,
Optimization was not really my point here, my point was to make the code less subtle and more clear. One may wonder why we set N_HIGH_MEMORY unconditionally when __only__ CONFIG_HIGHMEM matters for this case, and why we set N_NORMAL_MEMORY __only__ for CONFIG_HIGHMEM when we should not care about that at all.
I do not really expect a big impact here, mainly because check_for_memory is only being used during boot.
-- Oscar Salvador SUSE L3
| |