linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Help] Question about vm: fair zone allocator policy
@ 2014-01-07  1:37 yvxiang
  2014-01-11 18:38 ` Johannes Weiner
  0 siblings, 1 reply; 3+ messages in thread
From: yvxiang @ 2014-01-07  1:37 UTC (permalink / raw)
  To: hannes; +Cc: linux-mm

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

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?

    Thank you very much!!

[-- Attachment #2: Type: text/html, Size: 1659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Help] Question about vm: fair zone allocator policy
  2014-01-07  1:37 [Help] Question about vm: fair zone allocator policy yvxiang
@ 2014-01-11 18:38 ` Johannes Weiner
  2014-01-12 13:03   ` yvxiang
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Weiner @ 2014-01-11 18:38 UTC (permalink / raw)
  To: yvxiang; +Cc: linux-mm

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Help] Question about vm: fair zone allocator policy
  2014-01-11 18:38 ` Johannes Weiner
@ 2014-01-12 13:03   ` yvxiang
  0 siblings, 0 replies; 3+ messages in thread
From: yvxiang @ 2014-01-12 13:03 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: linux-mm

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

OK, I think I got it. Thank you very much!!


2014/1/12 Johannes Weiner <hannes@cmpxchg.org>

> 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.
>

[-- Attachment #2: Type: text/html, Size: 1915 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-12 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-07  1:37 [Help] Question about vm: fair zone allocator policy yvxiang
2014-01-11 18:38 ` Johannes Weiner
2014-01-12 13:03   ` yvxiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox