On (07/03/16 01:16), Sergey Senozhatsky wrote:
[..]
> +#ifdef CONFIG_PAGE_OWNER_TRACK_FREE
> +void __page_owner_free_pages(struct page *page, unsigned int order)
> +{
> +     int i;
> +     depot_stack_handle_t handle;
> +     struct page_ext *page_ext = lookup_page_ext(page);
> +
> +     if (unlikely(!page_ext))
> +             return;
> +
> +     handle = save_stack(0);
> +     page_ext->handles[PAGE_OWNER_HANDLE_FREE] = handle;
> +     __set_bit(PAGE_EXT_OWNER_FREE, &page_ext->flags);
> +
> +     for (i = 1; i < (1 << order); i++) {
> +             struct page_ext *ext = lookup_page_ext(page + 1);
> +
> +             if (unlikely(!ext))
> +                     continue;
> +             ext->handles[PAGE_OWNER_HANDLE_FREE] = handle;
> +             __set_bit(PAGE_EXT_OWNER_FREE, &ext->flags);
> +     }
> +}

I think this one is missing __clear_bit(PAGE_EXT_OWNER_ALLOC).

---
 mm/page_owner.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index 5a108d6..699922c 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -154,6 +154,7 @@ void __page_owner_free_pages(struct page *page, unsigned 
int order)
        handle = save_stack(0);
        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);
 
        for (i = 1; i < (1 << order); i++) {
                struct page_ext *ext = lookup_page_ext(page + 1);
@@ -162,6 +163,7 @@ void __page_owner_free_pages(struct page *page, unsigned 
int order)
                        continue;
                ext->handles[PAGE_OWNER_HANDLE_FREE] = handle;
                __set_bit(PAGE_EXT_OWNER_FREE, &ext->flags);
+               __clear_bit(PAGE_EXT_OWNER_ALLOC, &ext->flags);
        }
 }
 #else
-- 
2.9.0.rc1

Reply via email to