linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 3/3] mm/page_owner: track page free call chain
Date: Sun, 3 Jul 2016 14:59:24 +0900	[thread overview]
Message-ID: <20160703055924.GA513@swordfish> (raw)
In-Reply-To: <20160702161656.14071-4-sergey.senozhatsky@gmail.com>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-07-03  5:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02 16:16 [PATCH 0/3][RFC] mm/page:_owner: track page free call chain Sergey Senozhatsky
2016-07-02 16:16 ` [PATCH 1/3] mm/page_owner: rename page_owner functions Sergey Senozhatsky
2016-07-02 16:16 ` [PATCH 2/3] mm/page_owner: rename PAGE_EXT_OWNER flag Sergey Senozhatsky
2016-07-02 16:16 ` [PATCH 3/3] mm/page_owner: track page free call chain Sergey Senozhatsky
2016-07-03  5:59   ` Sergey Senozhatsky [this message]
2016-07-04  4:57   ` Joonsoo Kim
2016-07-04  5:07     ` Sergey Senozhatsky
2016-07-04  5:29       ` Joonsoo Kim
2016-07-04  5:45         ` Sergey Senozhatsky
2016-07-04  7:29           ` Joonsoo Kim
2016-07-04  7:53             ` Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2016-07-08 12:11 [RFC][PATCH v2 " Sergey Senozhatsky
2016-07-11 14:27 ` [PATCH " Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160703055924.GA513@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).