lkml.org 
[lkml]   [2007]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 3/7] shrink_page_list: Support isolating dirty pages on laundry list
On Tue, 21 Aug 2007, Mel Gorman wrote:

> > + if (list_empty(page_list))
> > + return 0;
> > +
>
> This needs a comment to explain why shrink_page_list() would be called
> with an empty list.

Ok.

> > @@ -407,10 +413,11 @@ static unsigned long shrink_page_list(st
> > if (TestSetPageLocked(page))
> > goto keep;
> >
> > - VM_BUG_ON(PageActive(page));
> > -
>
> This needs explanation in the leader. It implies that later you expect active
> and inactive pages to be passed to shrink_page. i.e. We now need to keep an
> eye out for where shrink_active_list() is sending pages to shrink_page_list()
> instead of simply rotating the active list to the inactive.

Ok.

>
> > sc->nr_scanned++;
> >
> > + if (PageActive(page))
> > + goto keep_locked;
> > +
> > if (!sc->may_swap && page_mapped(page))
> > goto keep_locked;
> >
> > @@ -506,6 +513,12 @@ static unsigned long shrink_page_list(st
> > if (!may_write_to_queue(mapping->backing_dev_info))
> > goto keep_locked;
> >
> > + if (laundry) {
> > + list_add(&page->lru, laundry);
> > + unlock_page(page);
> > + continue;
> > + }
>
> This needs a comment. What you are doing is explained in the leader but
> it may not help a future reader of the code.
>
> Also, with laundry specified there is no longer a check for PagePrivate
> to see if the buffers can be freed and got rid of. According to the
> comments in the next code block;

The check for buffers comes after the writeout. Writeout occurs when
laundry == NULL.

>
> * We do this even if the page is PageDirty().
> * try_to_release_page() does not perform I/O, but it is
> * possible for a page to have PageDirty set, but it is actually
> * clean (all its buffers are clean)
>
> Is this intentional?

Yes buffers will be removed after writeout. Writeout requires buffers.
-
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/

\
 
 \ /
  Last update: 2007-08-21 22:57    [W:0.066 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site