[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegt9k+YULet3vhmG3br7zSiHy-DRL+MiEE=HRzcs+mLzbw@mail.gmail.com>
Date: Fri, 18 Jul 2014 17:12:54 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Michal Hocko <mhocko@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>, Tejun Heo <tj@...nel.org>,
Vladimir Davydov <vdavydov@...allels.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org,
Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch 13/13] mm: memcontrol: rewrite uncharge API
On Fri, Jul 18, 2014 at 4:45 PM, Johannes Weiner <hannes@...xchg.org> wrote:
> I assumed the source page would always be new, according to this part
> in fuse_try_move_page():
>
> /*
> * This is a new and locked page, it shouldn't be mapped or
> * have any special flags on it
> */
> if (WARN_ON(page_mapped(oldpage)))
> goto out_fallback_unlock;
> if (WARN_ON(page_has_private(oldpage)))
> goto out_fallback_unlock;
> if (WARN_ON(PageDirty(oldpage) || PageWriteback(oldpage)))
> goto out_fallback_unlock;
> if (WARN_ON(PageMlocked(oldpage)))
> goto out_fallback_unlock;
>
> However, it's in the page cache and I can't really convince myself
> that it's not also on the LRU. Miklos, I have trouble pinpointing
> where oldpage is instantiated exactly and what state it might be in -
> can it already be on the LRU?
oldpage comes from ->readpages() (*NOT* ->readpage()), i.e. readahead.
AFAICS it is added to the LRU in read_cache_pages(), so it looks like
it is definitely on the LRU at that point.
Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists