From: Johannes Weiner <hannes@cmpxchg.org>
To: yvxiang <linyvxiang@gmail.com>
Cc: linux-mm@kvack.org
Subject: Re: [Help] Question about vm: fair zone allocator policy
Date: Sat, 11 Jan 2014 13:38:55 -0500 [thread overview]
Message-ID: <20140111183855.GA4407@cmpxchg.org> (raw)
In-Reply-To: <CANwX7LTkb3v6Aq9nqFWN-cykX08+fuAntFMDRu7DM_pcyK9iSw@mail.gmail.com>
On Tue, Jan 07, 2014 at 09:37:01AM +0800, yvxiang wrote:
> Hi, Johannes
>
> I'm a new comer to vm. And I read your commit 81c0a2bb about fair zone
> allocator policy, but I don't quite understand your opinion, especially
> the words that
>
> "the allocator may keep kswapd running while kswapd reclaim
> ensures that the page allocator can keep allocating from the first zone
> in
> the zonelist for extended periods of time. "
>
> Could you or someone else explain me what does this mean in more
> details? Or could you give me a example?
The page allocator tries to allocate from all zones in order of
preference: Normal, DMA32, DMA. If they are all at their low
watermark, kswapd is woken up and it will reclaim each zone until it's
back to the high watermark.
But as kswapd reclaims the Normal zone, the page allocator can
continue allocating from it. If that happens at roughly the same
pace, the Normal zone's watermark will hover somewhere between the low
and high watermark. Kswapd will not go to sleep and the page
allocator will not use the other zones.
The whole workload's memory will be allocated and reclaimed using only
the Normal zone, which might be only a few (hundred) megabytes, while
the 4G DMA32 zone is unused.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-01-11 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 1:37 yvxiang
2014-01-11 18:38 ` Johannes Weiner [this message]
2014-01-12 13:03 ` yvxiang
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=20140111183855.GA4407@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=linyvxiang@gmail.com \
/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