lkml.org 
[lkml]   [1999]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MM deadlock [was: Re: arca-vm-8...]
On Mon, 25 Jan 1999, Stephen C. Tweedie wrote:

> --- mm/filemap.c.~1~ Thu Jan 21 10:26:41 1999
> +++ mm/filemap.c Mon Jan 25 12:59:38 1999
> @@ -125,7 +125,7 @@
> struct page * page;
> int count;
>
> - count = (limit << 1) >> priority;
> + count = limit >> priority;
>
> page = mem_map + clock;
> do {
> @@ -147,7 +147,6 @@
> clock = page - mem_map;
> }
>
> - count--;

OK to remove the << 1 and to move count-- after checking referenced.

> referenced = test_and_clear_bit(PG_referenced, &page->flags);
>
> if (PageLocked(page))
> @@ -159,6 +158,8 @@
> /* We can't free pages unless there's just one user */
> if (atomic_read(&page->count) != 1)
> continue;
> +
> + count--;

but this is plain bogus. When your machine will reach 0 freeable pages
(and that happens a bit before to kill the process because OOM) you'll get
an infinite loop in shrink_mmap().

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:1.150 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site