lkml.org 
[lkml]   [2016]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC][PATCH v2 3/3] mm/page_owner: track page free call chain
On (07/11/16 15:21), Joonsoo Kim wrote:
[..]
> > +void __page_owner_free_pages(struct page *page, unsigned int order)
> > +{
> > + int i;
> > + depot_stack_handle_t handle = save_stack(0);
> > +
> > + for (i = 0; i < (1 << order); i++) {
> > + struct page_ext *page_ext = lookup_page_ext(page + i);
> > +
> > + if (unlikely(!page_ext))
> > + continue;
> > +
> > + page_ext->handles[PAGE_OWNER_HANDLE_FREE] = handle;
> > + __set_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags);
> > + __clear_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags);
> > + }
> > +}
>
> I can't find any clear function to PAGE_EXT_OWNER_FREE. Isn't it
> intended? If so, why?

the PAGE_EXT_OWNER_FREE bit is not heavily used now. the
only place is this test in __dump_page_owner()

if (!test_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags) &&
!test_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags)) {
pr_alert("page_owner info is not active (free page?)\n");
return;
}

other than that it's for symmetry/future use.

[..]
> > @@ -1073,6 +1073,9 @@ static void pagetypeinfo_showmixedcount_print(struct seq_file *m,
> > if (!test_bit(PAGE_EXT_OWNER_ALLOC, &page_ext->flags))
> > continue;
> >
> > + if (!test_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags))
> > + continue;
> > +
>
> I don't think this line is correct. Above PAGE_EXT_OWNER_ALLOC
> check is to find allocated page.

you are right. that PAGE_EXT_OWNER_FREE test is wrong, indeed.
thanks for spotting.

-ss

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