lkml.org 
[lkml]   [2014]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 13/13] mm: memcontrol: rewrite uncharge API
On Tue 15-07-14 14:19:35, Michal Hocko wrote:
> [...]
> > +/**
> > + * mem_cgroup_migrate - migrate a charge to another page
> > + * @oldpage: currently charged page
> > + * @newpage: page to transfer the charge to
> > + * @lrucare: page might be on LRU already
>
> which one? I guess the newpage?
>
> > + *
> > + * Migrate the charge from @oldpage to @newpage.
> > + *
> > + * Both pages must be locked, @newpage->mapping must be set up.
> > + */
> > +void mem_cgroup_migrate(struct page *oldpage, struct page *newpage,
> > + bool lrucare)
> > +{
> > + unsigned int nr_pages = 1;
> > + struct page_cgroup *pc;
> > +
> > + VM_BUG_ON_PAGE(!PageLocked(oldpage), oldpage);
> > + VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);
> > + VM_BUG_ON_PAGE(PageLRU(oldpage), oldpage);
> > + VM_BUG_ON_PAGE(PageLRU(newpage), newpage);
>
> VM_BUG_ON_PAGE(PageLRU(newpage) && !lruvec, newpage);

I guess everything except these two notes got addressed.

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-07-18 10:01    [W:0.153 / U:1.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site