From: Oscar Salvador <osalvador@techadventures.net>
To: Pasha Tatashin <Pavel.Tatashin@microsoft.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mhocko@suse.com" <mhocko@suse.com>,
"vbabka@suse.cz" <vbabka@suse.cz>,
"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Oscar Salvador <osalvador@suse.de>
Subject: Re: [PATCH] mm/page_alloc: Clean up check_for_memory
Date: Fri, 31 Aug 2018 22:45:43 +0200 [thread overview]
Message-ID: <20180831204543.GA3885@techadventures.net> (raw)
In-Reply-To: <b2fea9ef-84e9-84dc-c847-5b944a8d832f@microsoft.com>
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
prev parent reply other threads:[~2018-08-31 20:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 21:01 [PATCH] mm/page_alloc: Clean up check_for_memory Oscar Salvador
2018-08-28 21:35 ` Andrew Morton
2018-08-29 20:34 ` Oscar Salvador
2018-08-30 1:55 ` Pasha Tatashin
2018-08-31 12:24 ` Oscar Salvador
2018-08-31 14:04 ` Pasha Tatashin
2018-08-31 20:45 ` Oscar Salvador [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180831204543.GA3885@techadventures.net \
--to=osalvador@techadventures.net \
--cc=Pavel.Tatashin@microsoft.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=sfr@canb.auug.org.au \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).