linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: Andrea Arcangeli <andrea@suse.de>
Cc: "Juan J. Quintela" <quintela@fi.udc.es>,
	linux-mm@kvack.org, linux-kernel@vger.rutgers.edu,
	trond.myklebust@fys.uio.no
Subject: Re: classzone-VM + mapped pages out of lru_cache
Date: Thu, 4 May 2000 12:38:31 -0300 (BRST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0005041234490.23740-100000@duckman.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.21.0005041702560.2512-100000@alpha.random>

On Thu, 4 May 2000, Andrea Arcangeli wrote:

> --- 2.2.15/mm/filemap.c	Thu May  4 13:00:40 2000
> +++ /tmp/filemap.c	Thu May  4 17:11:18 2000
> @@ -68,7 +68,7 @@
>  
>  	p = &inode->i_pages;
>  	while ((page = *p) != NULL) {
> -		if (PageLocked(page)) {
> +		if (PageLocked(page) || atomic_read(&page->count) > 1) {
>  			p = &page->next;
>  			continue;
>  		}

Fun, fun, fun ...

So the other CPU takes a lock on the page while we're testing
for the page->count and increments the pagecount after the lock,
while we try to do something (call __free_page(page)?) with the
page ...

As long as the other cpu increments the page count quick enough
it should be ok, but when it doesn't we can *still* end up freeing
a locked page.  I've seen backtraces where __free_pages_ok()
Oopsed on PageLocked(page) and the function was called from
truncate_inode_pages().

The fix which is in the latest kernel from Linus fixed the bug for
those people. Stubbornly reversing the fix because you haven't
managed to reproduce it yet is most probably not the right thing
to do.

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel?  irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/		http://www.surriel.com/

--
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/

  parent reply	other threads:[~2000-05-04 15:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-03 16:26 Andrea Arcangeli
2000-05-04  0:42 ` David S. Miller
2000-05-04 10:00   ` Andrea Arcangeli
2000-05-04 14:40 ` Juan J. Quintela
2000-05-04 15:19   ` Andrea Arcangeli
2000-05-04 15:23     ` Andrea Arcangeli
2000-05-04 15:38     ` Rik van Riel [this message]
2000-05-04 17:59       ` Andrea Arcangeli
2000-05-04 19:24         ` Rik van Riel
2000-05-04 16:34     ` Manfred Spraul, Andrea Arcangeli
2000-05-04 16:48     ` Trond Myklebust
2000-05-04 18:43       ` Andrea Arcangeli
2000-05-04 19:32         ` Trond Myklebust
2000-05-04 20:15           ` Andrea Arcangeli
2000-05-05  7:01             ` Trond Myklebust
2000-05-04 16:34   ` Juan J. Quintela
2000-05-04 18:27     ` Chris Evans
     [not found] <3911ECCD.BA1BB24E@arcormail.de>
2000-05-04 23:44 ` Andrea Arcangeli
2000-05-05  0:03   ` Jens Axboe
2000-05-05  3:04   ` David S. Miller
2000-05-05  8:43     ` Russell King
2000-05-05 14:56     ` Andrea Arcangeli
2000-05-06 13:37   ` 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=Pine.LNX.4.21.0005041234490.23740-100000@duckman.conectiva \
    --to=riel@conectiva.com.br \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=quintela@fi.udc.es \
    --cc=riel@nl.linux.org \
    --cc=trond.myklebust@fys.uio.no \
    /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