Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1435912
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] mm/page_owner: track page free call chain |
| Date | 2016-07-03 08:00 +0200 |
| Message-ID | <rQIBH-4Vo-7@gated-at.bofh.it> (permalink) |
| References | <rQvO9-5Jn-7@gated-at.bofh.it> <rQvOa-5Jn-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3][RFC] mm/page:_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
[PATCH 2/3] mm/page_owner: rename PAGE_EXT_OWNER flag Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
[PATCH 1/3] mm/page_owner: rename page_owner functions Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
[PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-07-02 18:20 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-03 08:00 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 09:30 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 10:00 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 07:50 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 07:00 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-07-04 07:10 +0200
Re: [PATCH 3/3] mm/page_owner: track page free call chain Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-07-04 07:30 +0200
csiph-web