From: Roger Larsson <roger.larsson@norran.net>
To: Linus Torvalds <torvalds@transmeta.com>,
Andrea Arcangeli <andrea@suse.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: kswapd and MM overload fix
Date: Wed, 6 Jun 2001 01:48:49 +0200 [thread overview]
Message-ID: <200106052351.BAA12041@mailb.telia.com> (raw)
In-Reply-To: <Pine.LNX.4.31.0106051612500.9908-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.31.0106051612500.9908-100000@penguin.transmeta.com>
On Wednesday66 0666 6 June 2001 01:16, Linus Torvalds wrote:
> On Wed, 6 Jun 2001, Andrea Arcangeli wrote:
> > Anybody running on a machine with some zone empty (<16Mbyte boxes (PDAs),
> > <1G x86 with highmem enabled kernel or an arch with an iommu like alpha)
> > probably noticed that the MM was unusable on those hardware
> > configurations (as I also incidentally mentioned a few times on l-k in
> > the last months).
> >
> > Yesterday I checked and here it is the fix (included in 2.4.5aa3).
>
> I think the real problem is that zone->pages_{min,low,high} aren't
> initialized at all for empty zones. If they were initialized (to zero, of
> course), the shortage calculations would have worked automatically.
>
> Using uninitialized variables is always bad. Your patch is certainly fine,
> but I think we should also make the init code clear the zone data for
> empty zones so that these kinds of "use uninitialized stuff" things cannot
> happen. No?
>
Lets see - that zone will have no free nor inactive pages
In page_alloc.c:254 function __alloc_pages_limit
where water_mark will be zero too...
if (z->free_pages + z->inactive_clean_pages >= water_mark) {
we will attempt a lot of interesting/unnecessary stuff.
But it should be caught by the test a few lines up...
if (!z->size)
BUG();
In page_alloc.c:331 (function __alloc_pages)
if (z->free_pages >= z->pages_low) {
page = rmqueue(z, order);
if (page)
return page;
Hmm... a lot more than first meets the eye.
Note: >= matches < in another place, removing the = will leave the mm stuck...
/RogerL
--
Roger Larsson
Skellefteå
Sweden
prev parent reply other threads:[~2001-06-05 23:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-05 22:44 kswapd and MM overload fix Andrea Arcangeli
2001-06-05 23:16 ` Linus Torvalds
2001-06-05 23:48 ` Andrea Arcangeli
2001-06-05 23:51 ` Linus Torvalds
2001-06-06 7:54 ` Xavier Bestel
2001-06-05 23:48 ` Roger Larsson [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=200106052351.BAA12041@mailb.telia.com \
--to=roger.larsson@norran.net \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 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.