From: Andrea Arcangeli <andrea@novell.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: ZONE_PADDING wastes 4 bytes of the new cacheline
Date: Fri, 22 Oct 2004 18:58:09 +0200 [thread overview]
Message-ID: <20041022165809.GH14325@dualathlon.random> (raw)
In-Reply-To: <41787840.3060807@yahoo.com.au>
On Fri, Oct 22, 2004 at 01:02:24PM +1000, Nick Piggin wrote:
> I don't agree, there are times when you need to know the bare pages_xxx
> watermark, and times when you need to know the whole ->protection thing.
we'll see, I agree current alloc_pages is quite clean but I'm quite
tempted to have a strightforward alloc_pages as clean as 2.4:
for (;;) {
zone_t *z = *(zone++);
if (!z)
break;
if (zone_free_pages(z, order) > z->watermarks[class_idx].low) {
page = rmqueue(z, order);
if (page)
return page;
}
}
2.6 is like this:
/* Go through the zonelist once, looking for a zone with enough * free */
for (i = 0; (z = zones[i]) != NULL; i++) {
min = z->pages_low + (1<<order) + z->protection[alloc_type];
if (z->free_pages < min)
continue;
page = buffered_rmqueue(z, order, gfp_mask);
if (page)
goto got_pg;
}
I don't see any benefit in limiting the high order, infact it seems a
bad bug. If something you should limit the _small_ order, so that the
high order will have a slight chance to succeed. You're basically doing
the opposite.
The pages_low is completely useless too for example and it could go.
pages_min has some benefit for some more feature 2.6 provides (that
could be translated in more watermarks, to separate the "settings of
the watermarks" from the alloc_page user of the watermarks).
> OK I dont disagree that your setup calculations are much nicer, and
> the current ones are pretty broken...
ok cool.
next prev parent reply other threads:[~2004-10-22 17:11 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 1:17 ZONE_PADDING wastes 4 bytes of the new cacheline Andrea Arcangeli
2004-10-21 3:10 ` Nick Piggin
2004-10-21 4:36 ` Andrew Morton
2004-10-21 4:53 ` Nick Piggin
2004-10-21 10:51 ` Mikael Pettersson
2004-10-21 12:45 ` Andrea Arcangeli
2004-10-21 18:54 ` Adam Heath
2004-10-21 20:21 ` DaMouse
2004-10-21 21:24 ` Jon Masters
2004-10-22 10:09 ` DaMouse
2004-10-21 22:26 ` Nick Piggin
2004-10-21 22:45 ` Andrea Arcangeli
2004-10-22 0:34 ` Nick Piggin
2004-10-22 1:10 ` Andrea Arcangeli
2004-10-22 1:26 ` Andrew Morton
2004-10-22 2:55 ` Jesse Barnes
2004-10-22 3:38 ` Nick Piggin
2004-10-22 3:49 ` Jesse Barnes
2004-10-22 17:15 ` Andrea Arcangeli
2004-10-22 3:09 ` Nick Piggin
2004-10-22 3:26 ` Andrew Morton
2004-10-22 3:35 ` Nick Piggin
2004-10-22 17:13 ` Andrea Arcangeli
2004-10-22 17:07 ` Andrea Arcangeli
2004-10-22 15:50 ` Andrea Arcangeli
2004-10-22 3:02 ` Nick Piggin
2004-10-22 16:58 ` Andrea Arcangeli [this message]
2004-10-23 4:33 ` Nick Piggin
2004-10-23 9:59 ` Andrea Arcangeli
2004-10-23 10:22 ` Nick Piggin
2004-10-23 11:03 ` Andrea Arcangeli
2004-10-23 16:28 ` Nick Piggin
2004-10-25 12:44 ` Andrea Arcangeli
2004-10-25 12:49 ` Nick Piggin
2004-10-25 13:51 ` Andrea Arcangeli
2004-10-25 20:09 ` Robert White
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=20041022165809.GH14325@dualathlon.random \
--to=andrea@novell.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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