From: arjan@fenrus.demon.nl (Arjan van de Ven)
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-mm@kvack.org
Subject: Re: [patch] active/inactive lists
Date: Tue, 9 May 2000 14:43:04 +0200 (CEST) [thread overview]
Message-ID: <m12p9Ls-000OWuC@amadeus.home.nl> (raw)
In-Reply-To: <Pine.LNX.4.21.0005090714500.25637-100000@duckman.conectiva>
Hi,
in filemap.c, you first do
> +int free_inactive_pages(int priority, int gfp_mask, zone_t *zone)
> +{
[snip]
> + while ((page_lru = page_lru->prev) != &pgdat->inactive_list &&
> + count) {
> +next_page:
> + /* Catch it if we loop back to next_page. */
> + if (page_lru == &pgdat->inactive_list)
> + break;
[snip]
> + /* We'll list_del the page, so get the next pointer now. */
> + page_lru = page_lru->prev;
[snip]
> + spin_unlock(&pgdat->page_list_lock);
> unlock_continue:
[snip]
> + /* Damn, failed ... re-take lock and put page back the list. */
> + spin_lock(&pgdat->page_list_lock);
> + list_add(&(page)->lru, &pgdat->inactive_list);
> + pgdat->inactive_pages++;
> + zone->inactive_pages++;
> + PageSetInactive(page);
> UnlockPage(page);
> put_page(page);
> + goto next_page;
> }
Where the last goto enters the loop again. But what stops others (including
other CPUs in the same funcion) from puting the new page_lru on another
queue or mess with it in an other way? The "goto next_page" probably should
be changed into something that starts at a point that is guaranteed to be in
the correct queue.
Greetings,
Arjan van de Ven
--
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/
next prev parent reply other threads:[~2000-05-09 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-09 10:19 Rik van Riel
2000-05-09 12:43 ` Arjan van de Ven [this message]
2000-05-09 13:53 ` Rik van Riel
2000-05-15 15:10 T. C. Raymond
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=m12p9Ls-000OWuC@amadeus.home.nl \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox