Re: page_launder() bug

From: Rik van Riel (riel@conectiva.com.br)
Date: Sun May 13 2001 - 11:24:39 EST


On Tue, 8 May 2001, Mikulas Patocka wrote:

> > + if (!dead_swap_page &&
> > + (PageTestandClearReferenced(page) || page->age > 0 ||
> > + (!page->buffers && page_count(page) > 1) ||
> > + page_ramdisk(page))) {
> ^^^^^^^^^^^^^^^^^^^^^^
> > del_page_from_inactive_dirty_list(page);
> > add_page_to_active_list(page);
> > continue;
>
> #define page_ramdisk(page) \
> (page->buffers && (MAJOR(page->buffers->b_dev) == RAMDISK_MAJOR))
>
> Are you sure that no one will release buffers under your hands?

Two things can happen:

1) the page gets ramdisk buffers _after_ we look at it first,
   in this case the page isn't freeable and will be moved to
   the active list on the next page_launder() loop

2) the page loses its ramdisk buffers after we look at it,
   now the page is freeable, but we won't see it again until
   it is moved from the active list to the inactive_dirty
   list again

Any side effects harmful enough to warrant complicating this
test ?

regards,

Rik

--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/ http://distro.conectiva.com/

Send all your spam to aardvark@nl.linux.org (spam digging piggy)

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



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:32 EST