From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>,
David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] mm/compaction: print current range where compaction work
Date: Mon, 12 Jan 2015 15:34:53 +0100 [thread overview]
Message-ID: <54B3DB8D.3000005@suse.cz> (raw)
In-Reply-To: <1421050875-26332-3-git-send-email-iamjoonsoo.kim@lge.com>
On 01/12/2015 09:21 AM, Joonsoo Kim wrote:
> It'd be useful to know current range where compaction work for detailed
> analysis. With it, we can know pageblock where we actually scan and
> isolate, and, how much pages we try in that pageblock and can guess why
> it doesn't become freepage with pageblock order roughly.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> include/trace/events/compaction.h | 30 +++++++++++++++++++++++-------
> mm/compaction.c | 9 ++++++---
> 2 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h
> index 839f6fa..139020b 100644
> --- a/include/trace/events/compaction.h
> +++ b/include/trace/events/compaction.h
> @@ -11,39 +11,55 @@
>
> DECLARE_EVENT_CLASS(mm_compaction_isolate_template,
>
> - TP_PROTO(unsigned long nr_scanned,
> + TP_PROTO(
> + unsigned long start_pfn,
> + unsigned long end_pfn,
> + unsigned long nr_scanned,
> unsigned long nr_taken),
>
> - TP_ARGS(nr_scanned, nr_taken),
> + TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken),
>
> TP_STRUCT__entry(
> + __field(unsigned long, start_pfn)
> + __field(unsigned long, end_pfn)
> __field(unsigned long, nr_scanned)
> __field(unsigned long, nr_taken)
> ),
>
> TP_fast_assign(
> + __entry->start_pfn = start_pfn;
> + __entry->end_pfn = end_pfn;
> __entry->nr_scanned = nr_scanned;
> __entry->nr_taken = nr_taken;
> ),
>
> - TP_printk("nr_scanned=%lu nr_taken=%lu",
> + TP_printk("range=(0x%lx ~ 0x%lx) nr_scanned=%lu nr_taken=%lu",
> + __entry->start_pfn,
> + __entry->end_pfn,
> __entry->nr_scanned,
> __entry->nr_taken)
> );
>
> DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_migratepages,
>
> - TP_PROTO(unsigned long nr_scanned,
> + TP_PROTO(
> + unsigned long start_pfn,
> + unsigned long end_pfn,
> + unsigned long nr_scanned,
> unsigned long nr_taken),
>
> - TP_ARGS(nr_scanned, nr_taken)
> + TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
> );
>
> DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
> - TP_PROTO(unsigned long nr_scanned,
> +
> + TP_PROTO(
> + unsigned long start_pfn,
> + unsigned long end_pfn,
> + unsigned long nr_scanned,
> unsigned long nr_taken),
>
> - TP_ARGS(nr_scanned, nr_taken)
> + TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
> );
>
> TRACE_EVENT(mm_compaction_migratepages,
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 2d86a20..be28469 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -429,11 +429,12 @@ isolate_fail:
>
> }
>
> + trace_mm_compaction_isolate_freepages(*start_pfn, blockpfn,
> + nr_scanned, total_isolated);
> +
> /* Record how far we have got within the block */
> *start_pfn = blockpfn;
>
> - trace_mm_compaction_isolate_freepages(nr_scanned, total_isolated);
> -
> /*
> * If strict isolation is requested by CMA then check that all the
> * pages requested were isolated. If there were any failures, 0 is
> @@ -589,6 +590,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
> unsigned long flags = 0;
> bool locked = false;
> struct page *page = NULL, *valid_page = NULL;
> + unsigned long start_pfn = low_pfn;
>
> /*
> * Ensure that there are not too many pages isolated from the LRU
> @@ -749,7 +751,8 @@ isolate_success:
> if (low_pfn == end_pfn)
> update_pageblock_skip(cc, valid_page, nr_isolated, true);
>
> - trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);
> + trace_mm_compaction_isolate_migratepages(start_pfn, low_pfn,
> + nr_scanned, nr_isolated);
>
> count_compact_events(COMPACTMIGRATE_SCANNED, nr_scanned);
> if (nr_isolated)
>
--
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>
next prev parent reply other threads:[~2015-01-12 14:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 8:21 [PATCH v2 1/5] mm/compaction: change tracepoint format from decimal to hexadecimal Joonsoo Kim
2015-01-12 8:21 ` [PATCH v2 2/5] mm/compaction: enhance tracepoint output for compaction begin/end Joonsoo Kim
2015-01-12 14:32 ` Vlastimil Babka
2015-01-12 8:21 ` [PATCH v2 3/5] mm/compaction: print current range where compaction work Joonsoo Kim
2015-01-12 14:34 ` Vlastimil Babka [this message]
2015-01-12 8:21 ` [PATCH v2 4/5] mm/compaction: more trace to understand when/why compaction start/finish Joonsoo Kim
2015-01-12 15:53 ` Vlastimil Babka
2015-01-13 7:16 ` Joonsoo Kim
2015-01-13 8:29 ` Vlastimil Babka
2015-01-12 8:21 ` [PATCH v2 5/5] mm/compaction: add tracepoint to observe behaviour of compaction defer Joonsoo Kim
2015-01-12 16:35 ` Vlastimil Babka
2015-01-13 7:18 ` Joonsoo Kim
2015-01-13 8:35 ` Vlastimil Babka
2015-01-12 14:23 ` [PATCH v2 1/5] mm/compaction: change tracepoint format from decimal to hexadecimal Vlastimil Babka
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=54B3DB8D.3000005@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=rientjes@google.com \
/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