From: Andrea Arcangeli <andrea@suse.de>
To: "DICKENS,CARY (HP-Loveland,ex2)" <cary_dickens2@hp.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"HABBINGA,ERIK (HP-Loveland,ex1)" <erik_habbinga@hp.com>
Subject: Re: 2.4.10 still slow compared to 2.4.5pre1
Date: Wed, 26 Sep 2001 03:58:10 +0200 [thread overview]
Message-ID: <20010926035810.V1782@athlon.random> (raw)
In-Reply-To: <C5C45572D968D411A1B500D0B74FF4A80418D54B@xfc01.fc.hp.com>
In-Reply-To: <C5C45572D968D411A1B500D0B74FF4A80418D54B@xfc01.fc.hp.com>; from cary_dickens2@hp.com on Tue, Sep 25, 2001 at 08:44:35PM -0400
On Tue, Sep 25, 2001 at 08:44:35PM -0400, DICKENS,CARY (HP-Loveland,ex2) wrote:
> Andrea,
>
> I hate to inform you that we tracked this down and nr_inactive_pages can be
> zero. This causes divide by zero in shrink_caches.
>
> This is from the 00_vm-tweaks-1 patch:
> static int shrink_caches(int priority, zone_t * classzone, unsigned int
> gfp_mask, int nr_pages)
> {
> - int max_scan = nr_inactive_pages / priority;
> + int max_scan;
> + int chunk_size = nr_pages;
> + unsigned long ratio;
>
> nr_pages -= kmem_cache_reap(gfp_mask);
> if (nr_pages <= 0)
> return 0;
>
> - /* Do we want to age the active list? */
> - if (nr_inactive_pages < nr_active_pages*2)
> - refill_inactive(nr_pages);
> + spin_lock(&pagemap_lru_lock);
> + nr_pages = chunk_size;
> + /* try to keep the active list 2/3 of the size of the cache */
> + ratio = (unsigned long) nr_pages * nr_active_pages /
> (nr_inactive_pages * 2);
how can you ever trigger it during boot?
anyways that is a real bug, thanks for spotting it, you can just add 1
to nr_inactive_pages to fix it.
ratio = (unsigned long) nr_pages * nr_active_pages / ((nr_inactive_pages+1) * 2);
it will be fixed in the next update of course.
Andrea
next prev parent reply other threads:[~2001-09-26 1:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-26 0:44 2.4.10 still slow compared to 2.4.5pre1 DICKENS,CARY (HP-Loveland,ex2)
2001-09-26 1:58 ` Andrea Arcangeli [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-09-25 22:06 DICKENS,CARY (HP-Loveland,ex2)
2001-09-25 21:22 DICKENS,CARY (HP-Loveland,ex2)
2001-09-25 21:36 ` Andrew Morton
2001-09-25 21:56 ` Andrea Arcangeli
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=20010926035810.V1782@athlon.random \
--to=andrea@suse.de \
--cc=cary_dickens2@hp.com \
--cc=erik_habbinga@hp.com \
--cc=linux-kernel@vger.kernel.org \
/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