Thread (7 messages) 7 messages, 3 authors, 2018-08-31

Re: [PATCH] mm/page_alloc: Clean up check_for_memory

From: Oscar Salvador <hidden>
Date: 2018-08-31 20:45:48
Also in: lkml

On Fri, Aug 31, 2018 at 02:04:59PM +0000, Pasha Tatashin wrote:
Are you saying the code that is in mainline is broken? Because we set
node_set_state(nid, N_NORMAL_MEMORY); even on node with N_HIGH_MEMORY:

6826			if (N_NORMAL_MEMORY != N_HIGH_MEMORY &&
6827			    zone_type <= ZONE_NORMAL)
6828				node_set_state(nid, N_NORMAL_MEMORY);
Yes, and that is fine. Although the curent code is subtle for the reasons
I expplained in the changelog.
What I am saying is that the code you suggested would not work
because your code either sets N_NORMAL_MEMORY or N_HIGH_MEMORY and then
breaks the loop.

That is wrong because when we are on a CONFIG_HIGHMEM system,
it can happen that we have a node with both types, so we have to set
both types of memory.

N_HIGH_MEMORY, and N_NORMAL_MEMORY if the zone is <= ZONE_NORMAL.

Thanks
-- 
Oscar Salvador
SUSE L3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help