All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Arjan van de Ven <arjan@fenrus.demon.nl>, linux-mm@kvack.org
Subject: Re: [patch] active/inactive queues for pre7-4
Date: Wed, 10 May 2000 03:07:57 +0200	[thread overview]
Message-ID: <3918B66D.C7B7C777@norran.net> (raw)
In-Reply-To: Pine.LNX.4.21.0005091226260.25637-100000@duckman.conectiva

I think I found one bug in __page_reactivate

see below...


> --- linux-2.3.99-pre7-4/mm/filemap.c.orig       Thu May  4 11:38:24 2000
> +++ linux-2.3.99-pre7-4/mm/filemap.c    Tue May  9 12:09:42 2000
> @@ -233,61 +233,205 @@
>         spin_unlock(&pagecache_lock);
>  }
> 
> -int shrink_mmap(int priority, int gfp_mask, zone_t *zone)
> +/* basically lru_cache_del() and lru_cache_add() merged together */
> +static void __page_reactivate(struct page *page)
> +{
> +       struct zone_struct * zone = page->zone;
> +       pg_data_t * pgdat = zone->zone_pgdat;
> +       extern wait_queue_head_t kswapd_wait;
> +
> +       list_del(&(page)->lru);
> +       pgdat->inactive_pages--;
> +       zone->inactive_pages--;
> +       PageClearInactive(page);
> +
> +       list_add(&(page)->lru, &pgdat->active_list);

> +       pgdat->active_pages++;
> +       pgdat->active_pages++;

pgdat->active_pages is incremented twice!
second one should IMHO be
 zone->active_pages

/RogerL
--
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.eu.org/Linux-MM/

  reply	other threads:[~2000-05-10  1:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-09 15:27 [patch] active/inactive queues for pre7-4 Rik van Riel
2000-05-10  1:07 ` Roger Larsson [this message]
2000-05-09 23:11   ` Rik van Riel

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=3918B66D.C7B7C777@norran.net \
    --to=roger.larsson@norran.net \
    --cc=arjan@fenrus.demon.nl \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    /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.