lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] mm: Generalize putback scan functions
On Thu, Feb 14, 2019 at 01:35:37PM +0300, Kirill Tkhai wrote:
> +static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec,
> + struct list_head *list)
> {
> struct pglist_data *pgdat = lruvec_pgdat(lruvec);
> + int nr_pages, nr_moved = 0;
> LIST_HEAD(pages_to_free);
> + struct page *page;
> + enum lru_list lru;
>
> - /*
> - * Put back any unfreeable pages.
> - */
> - while (!list_empty(page_list)) {
> - struct page *page = lru_to_page(page_list);
> - int lru;
> -
> + while (!list_empty(list)) {
> + page = lru_to_page(list);
> VM_BUG_ON_PAGE(PageLRU(page), page);
> - list_del(&page->lru);
> if (unlikely(!page_evictable(page))) {
> + list_del_init(&page->lru);

Why change to list_del_init? It's more special than list_del but doesn't seem
needed since the page is list_add()ed later.

That postprocess script from patch 1 seems kinda broken before this series, and
still is. Not that it should block this change. Out of curiosity did you get
it to run?

\
 
 \ /
  Last update: 2019-02-15 21:39    [W:0.060 / U:9.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site