Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550650 > unrolled thread

Re: [PATCH 3/3] oom, trace: add compaction retry tracepoint

Started byVlastimil Babka <vbabka@suse.cz>
First post2017-01-04 11:50 +0100
Last post2017-01-04 16:00 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] oom, trace: add compaction retry tracepoint Vlastimil Babka <vbabka@suse.cz> - 2017-01-04 11:50 +0100
    Re: [PATCH 3/3] oom, trace: add compaction retry tracepoint Michal Hocko <mhocko@kernel.org> - 2017-01-04 12:00 +0100
      Re: [PATCH 3/3] oom, trace: add compaction retry tracepoint Vlastimil Babka <vbabka@suse.cz> - 2017-01-04 16:00 +0100

#1550650 — Re: [PATCH 3/3] oom, trace: add compaction retry tracepoint

FromVlastimil Babka <vbabka@suse.cz>
Date2017-01-04 11:50 +0100
SubjectRe: [PATCH 3/3] oom, trace: add compaction retry tracepoint
Message-ID<sVRiN-3vz-3@gated-at.bofh.it>
On 12/20/2016 02:01 PM, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> Higher order requests oom debugging is currently quite hard. We do have
> some compaction points which can tell us how the compaction is operating
> but there is no trace point to tell us about compaction retry logic.
> This patch adds a one which will have the following format
> 
>             bash-3126  [001] ....  1498.220001: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=withdrawn retries=0 max_retries=16 should_retry=0
> 
> we can see that the order 9 request is not retried even though we are in
> the highest compaction priority mode becase the last compaction attempt
> was withdrawn. This means that compaction_zonelist_suitable must have
> returned false and there is no suitable zone to compact for this request
> and so no need to retry further.
> 
> another example would be
>            <...>-3137  [001] ....    81.501689: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=failed retries=0 max_retries=16 should_retry=0
> 
> in this case the order-9 compaction failed to find any suitable
> block. We do not retry anymore because this is a costly request
> and those do not go below COMPACT_PRIO_SYNC_LIGHT priority.
> 
> Changes since v1
> - fix compaction_result into highlevel constants translation as per
>   Vlastimil
> 
> Signed-off-by: Michal Hocko <mhocko@suse.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>

Hmm I've noticed that I didn't suggest the following below here,
although I did for the vmscan tracepoints now. How about adding this
-fix for consistency?

--------8<--------
From: Vlastimil Babka <vbabka@suse.cz>
Date: Wed, 4 Jan 2017 11:44:09 +0100
Subject: [PATCH] oom, trace: add compaction retry tracepoint-fix

Let's print the compaction priorities lower-case and without
prefix for consistency.

Also indent fix in compact_result_to_feedback().

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 include/trace/events/mmflags.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
index aa4caa6914a9..e4c3a0febcce 100644
--- a/include/trace/events/mmflags.h
+++ b/include/trace/events/mmflags.h
@@ -195,7 +195,7 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
 
 #define compact_result_to_feedback(result)	\
 ({						\
- 	enum compact_result __result = result;	\
+	enum compact_result __result = result;	\
 	(compaction_failed(__result)) ? COMPACTION_FAILED : \
 		(compaction_withdrawn(__result)) ? COMPACTION_WITHDRAWN : COMPACTION_PROGRESS; \
 })
@@ -206,9 +206,9 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
 	EMe(COMPACTION_PROGRESS,	"progress")
 
 #define COMPACTION_PRIORITY						\
-	EM(COMPACT_PRIO_SYNC_FULL,	"COMPACT_PRIO_SYNC_FULL")	\
-	EM(COMPACT_PRIO_SYNC_LIGHT,	"COMPACT_PRIO_SYNC_LIGHT")	\
-	EMe(COMPACT_PRIO_ASYNC,		"COMPACT_PRIO_ASYNC")
+	EM(COMPACT_PRIO_SYNC_FULL,	"sync_full")	\
+	EM(COMPACT_PRIO_SYNC_LIGHT,	"sync_light")	\
+	EMe(COMPACT_PRIO_ASYNC,		"async")
 #else
 #define COMPACTION_STATUS
 #define COMPACTION_PRIORITY
-- 
2.11.0

[toc] | [next] | [standalone]


#1550651

FromMichal Hocko <mhocko@kernel.org>
Date2017-01-04 12:00 +0100
Message-ID<sVRst-3zH-9@gated-at.bofh.it>
In reply to#1550650
On Wed 04-01-17 11:47:56, Vlastimil Babka wrote:
> On 12/20/2016 02:01 PM, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@suse.com>
> > 
> > Higher order requests oom debugging is currently quite hard. We do have
> > some compaction points which can tell us how the compaction is operating
> > but there is no trace point to tell us about compaction retry logic.
> > This patch adds a one which will have the following format
> > 
> >             bash-3126  [001] ....  1498.220001: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=withdrawn retries=0 max_retries=16 should_retry=0
> > 
> > we can see that the order 9 request is not retried even though we are in
> > the highest compaction priority mode becase the last compaction attempt
> > was withdrawn. This means that compaction_zonelist_suitable must have
> > returned false and there is no suitable zone to compact for this request
> > and so no need to retry further.
> > 
> > another example would be
> >            <...>-3137  [001] ....    81.501689: compact_retry: order=9 priority=COMPACT_PRIO_SYNC_LIGHT compaction_result=failed retries=0 max_retries=16 should_retry=0
> > 
> > in this case the order-9 compaction failed to find any suitable
> > block. We do not retry anymore because this is a costly request
> > and those do not go below COMPACT_PRIO_SYNC_LIGHT priority.
> > 
> > Changes since v1
> > - fix compaction_result into highlevel constants translation as per
> >   Vlastimil
> > 
> > Signed-off-by: Michal Hocko <mhocko@suse.com>
> > Acked-by: Vlastimil Babka <vbabka@suse.cz>
> 
> Hmm I've noticed that I didn't suggest the following below here,
> although I did for the vmscan tracepoints now. How about adding this
> -fix for consistency?
> 
> --------8<--------
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Wed, 4 Jan 2017 11:44:09 +0100
> Subject: [PATCH] oom, trace: add compaction retry tracepoint-fix
> 
> Let's print the compaction priorities lower-case and without
> prefix for consistency.
> 
> Also indent fix in compact_result_to_feedback().
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

I would just worry that c&p constant name is easier to work with when
vim -t $PRIO or git grep $PRIO. But if the lowercase and shorter sounds
better to you then no objections from me.

> ---
>  include/trace/events/mmflags.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
> index aa4caa6914a9..e4c3a0febcce 100644
> --- a/include/trace/events/mmflags.h
> +++ b/include/trace/events/mmflags.h
> @@ -195,7 +195,7 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
>  
>  #define compact_result_to_feedback(result)	\
>  ({						\
> - 	enum compact_result __result = result;	\
> +	enum compact_result __result = result;	\
>  	(compaction_failed(__result)) ? COMPACTION_FAILED : \
>  		(compaction_withdrawn(__result)) ? COMPACTION_WITHDRAWN : COMPACTION_PROGRESS; \
>  })
> @@ -206,9 +206,9 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
>  	EMe(COMPACTION_PROGRESS,	"progress")
>  
>  #define COMPACTION_PRIORITY						\
> -	EM(COMPACT_PRIO_SYNC_FULL,	"COMPACT_PRIO_SYNC_FULL")	\
> -	EM(COMPACT_PRIO_SYNC_LIGHT,	"COMPACT_PRIO_SYNC_LIGHT")	\
> -	EMe(COMPACT_PRIO_ASYNC,		"COMPACT_PRIO_ASYNC")
> +	EM(COMPACT_PRIO_SYNC_FULL,	"sync_full")	\
> +	EM(COMPACT_PRIO_SYNC_LIGHT,	"sync_light")	\
> +	EMe(COMPACT_PRIO_ASYNC,		"async")
>  #else
>  #define COMPACTION_STATUS
>  #define COMPACTION_PRIORITY
> -- 
> 2.11.0
> 

-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [next] | [standalone]


#1550894

FromVlastimil Babka <vbabka@suse.cz>
Date2017-01-04 16:00 +0100
Message-ID<sVVcK-62m-23@gated-at.bofh.it>
In reply to#1550651
On 01/04/2017 11:56 AM, Michal Hocko wrote:
> On Wed 04-01-17 11:47:56, Vlastimil Babka wrote:
>> On 12/20/2016 02:01 PM, Michal Hocko wrote:
>>> From: Michal Hocko <mhocko@suse.com>
>>
>> --------8<--------
>> From: Vlastimil Babka <vbabka@suse.cz>
>> Date: Wed, 4 Jan 2017 11:44:09 +0100
>> Subject: [PATCH] oom, trace: add compaction retry tracepoint-fix
>>
>> Let's print the compaction priorities lower-case and without
>> prefix for consistency.
>>
>> Also indent fix in compact_result_to_feedback().
>>
>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> 
> I would just worry that c&p constant name is easier to work with when
> vim -t $PRIO or git grep $PRIO. But if the lowercase and shorter sounds
> better to you then no objections from me.

Yeah, valid point, but since we didn't do that until now, let's stay
consistent.

>> ---
>>  include/trace/events/mmflags.h | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
>> index aa4caa6914a9..e4c3a0febcce 100644
>> --- a/include/trace/events/mmflags.h
>> +++ b/include/trace/events/mmflags.h
>> @@ -195,7 +195,7 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
>>  
>>  #define compact_result_to_feedback(result)	\
>>  ({						\
>> - 	enum compact_result __result = result;	\
>> +	enum compact_result __result = result;	\
>>  	(compaction_failed(__result)) ? COMPACTION_FAILED : \
>>  		(compaction_withdrawn(__result)) ? COMPACTION_WITHDRAWN : COMPACTION_PROGRESS; \
>>  })
>> @@ -206,9 +206,9 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY,	"softdirty"	)		\
>>  	EMe(COMPACTION_PROGRESS,	"progress")
>>  
>>  #define COMPACTION_PRIORITY						\
>> -	EM(COMPACT_PRIO_SYNC_FULL,	"COMPACT_PRIO_SYNC_FULL")	\
>> -	EM(COMPACT_PRIO_SYNC_LIGHT,	"COMPACT_PRIO_SYNC_LIGHT")	\
>> -	EMe(COMPACT_PRIO_ASYNC,		"COMPACT_PRIO_ASYNC")
>> +	EM(COMPACT_PRIO_SYNC_FULL,	"sync_full")	\
>> +	EM(COMPACT_PRIO_SYNC_LIGHT,	"sync_light")	\
>> +	EMe(COMPACT_PRIO_ASYNC,		"async")
>>  #else
>>  #define COMPACTION_STATUS
>>  #define COMPACTION_PRIORITY
>> -- 
>> 2.11.0
>>
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web