From: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>
To: Mel <mel@csn.ul.ie>, linux-kernel@vger.kernel.org
Subject: Re: page_alloc.c comments patch v2
Date: Thu, 18 Apr 2002 18:17:47 -0700 [thread overview]
Message-ID: <1937110000.1019179067@flay> (raw)
In-Reply-To: <Pine.LNX.4.44.0204182332500.5700-100000@skynet>
Firstly, nice idea to actually comment the code ;-)
Re: __alloc_pages
> + * @zonelist: The preferred zone to allocate from
Zonelist is not a zone, it's a list of zones suitable for the given
zonemask on that pg_data_t in order of preference. Maybe I'm
just misreading your syntax.
> + /* Cycle through all the zones available */
> for (;;) {
> zone_t *z = *(zone++);
> if (!z)
> break;
>
> + /* Increase min by pages_low so that too many pages from a zone
> + * are not allocated. If pages_low is reached, kswapd needs to
> + * begin work
> + *
> + * QUERY: If there was more than one zone in ZONE_NORMAL and
> + * each zone had a pages_low value of 10, wouldn't the
> + * second zone have a min value of 20, the third of 30
> + * and so on? Wouldn't this possibly wake kswapd before
> + * it was really needed? Is this the expected behaviour?
I don't see how there could be "more that one zone in ZONE_NORMAL"?
There can only be one ZONE_NORMAL per pgdata_t.
Look at build_zonelists to see how the fallback lists (zonelist) are built
up.
There's one zonelist for each possible zonemask. Depending on the mask
we add one of:
1) ZONE_HIGHMEM, ZONE_NORMAL and ZONE_DMA
2) ZONE_NORMAL and ZONE_DMA
3) ZONE_DMA.
So there's no way there could be two ZONE_NORMAL's in a list,
or that ZONE_NORMAL for that pgdat could be added twice.
M.
next prev parent reply other threads:[~2002-04-19 0:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-18 23:16 page_alloc.c comments patch v2 Mel
2002-04-19 1:17 ` Martin J. Bligh [this message]
2002-04-19 0:37 ` Mel
2002-04-19 1:54 ` Martin J. Bligh
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=1937110000.1019179067@flay \
--to=martin.bligh@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.