<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
If this state tracking has been off for as long as it has (Ive never come across it before), I feel like it can probably go without a fight.&nbsp; I just dont think the info provided is particularly important/useful.<br>
<br>
Trace points or even really just blunter tracing tools can probably get the desired info in a pinch...<br>
<br>
- Patrick
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-devel &lt;lustre-devel-bounces@lists.lustre.org&gt; on behalf of James Simmons &lt;jsimmons@infradead.org&gt;<br>
<b>Sent:</b> Monday, February 11, 2019 11:19:45 PM<br>
<b>To:</b> NeilBrown<br>
<b>Cc:</b> Lustre Development List<br>
<b>Subject:</b> Re: [lustre-devel] [PATCH 11/21] lustre: cl_object: remove vestigial debugging.</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
&gt; &gt;&gt; cl_env_inc() and cl_env_dec() don't do anything,<br>
&gt; &gt;&gt; so discard them.<br>
&gt; &gt;<br>
&gt; &gt; I don't know about this one. I saw Andreas response as well. <br>
&gt; &gt; So this was apart of &quot;LU-744 obdclass: revise stats for cl_object cache&quot;<br>
&gt; &gt; In the end it was turned off by default in the OpenSFS branch since it<br>
&gt; &gt; made performance take a hit. To enable in OpenSFS branch you have to run<br>
&gt; &gt; ./configure --enable-pgstate-track. We have a few like this for Lustre so<br>
&gt; &gt; I was going to bring this up. Do we want to remove this work for both the<br>
&gt; &gt; upstream client as well as OpenSFS tree or properly implement this by<br>
&gt; &gt; making it a Kconfig option when CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK is<br>
&gt; &gt; enabled? Its just a matter of porting OpenSFS commit <br>
&gt; &gt; 5cae09a2409dcd396a1ee7be1eca7d3bbf77365e<br>
&gt; &gt;<br>
&gt; &gt; What do you think?<br>
&gt; <br>
&gt; How useful are these stats?<br>
&gt; Stats that are never compiled in aren't likely to tell you much :-)<br>
&gt; <br>
&gt; Has any thought been given to per-cpu stats counting?&nbsp; That seems to be<br>
&gt; the preferred approach for high-frequency accounting.<br>
&gt; <br>
&gt; I think having a CONFIG option to enable expensive consistency checks is<br>
&gt; a good idea - developers will enable it when they don't care about<br>
&gt; performance.<br>
&gt; Having a CONFIG option for expensive performance stats seems... weird.<br>
&gt; Who would use it, and how meaningful would the number be?<br>
<br>
Which per-cpu stats are you talking about? I know perf can do this kind of<br>
profiling with performance counters but I don't think you can use those<br>
with cl_pages specifically. I know the lustre developers really dislike<br>
trace point but this could be one of those cases where it makes sense.<br>
&nbsp;<br>
&gt; NeilBrown<br>
&gt; <br>
&gt; <br>
&gt; &gt;<br>
&gt; &gt;&gt; Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;<br>
&gt; &gt;&gt; ---<br>
&gt; &gt;&gt;&nbsp; drivers/staging/lustre/lustre/obdclass/cl_object.c |&nbsp;&nbsp; 15 ---------------<br>
&gt; &gt;&gt;&nbsp; 1 file changed, 15 deletions(-)<br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c<br>
&gt; &gt;&gt; index d71a680660da..1e704078664e 100644<br>
&gt; &gt;&gt; --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c<br>
&gt; &gt;&gt; &#43;&#43;&#43; b/drivers/staging/lustre/lustre/obdclass/cl_object.c<br>
&gt; &gt;&gt; @@ -565,14 &#43;565,6 @@ struct cl_env {<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; void&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *ce_debug;<br>
&gt; &gt;&gt;&nbsp; };<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt; -static void cl_env_inc(enum cache_stats_item item)<br>
&gt; &gt;&gt; -{<br>
&gt; &gt;&gt; -}<br>
&gt; &gt;&gt; -<br>
&gt; &gt;&gt; -static void cl_env_dec(enum cache_stats_item item)<br>
&gt; &gt;&gt; -{<br>
&gt; &gt;&gt; -}<br>
&gt; &gt;&gt; -<br>
&gt; &gt;&gt;&nbsp; static void cl_env_init0(struct cl_env *cle, void *debug)<br>
&gt; &gt;&gt;&nbsp; {<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; LASSERT(cle-&gt;ce_ref == 0);<br>
&gt; &gt;&gt; @@ -581,7 &#43;573,6 @@ static void cl_env_init0(struct cl_env *cle, void *debug)<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cle-&gt;ce_ref = 1;<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cle-&gt;ce_debug = debug;<br>
&gt; &gt;&gt; -&nbsp; cl_env_inc(CS_busy);<br>
&gt; &gt;&gt;&nbsp; }<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt;&nbsp; static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)<br>
&gt; &gt;&gt; @@ -611,9 &#43;602,6 @@ static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rc != 0) {<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kmem_cache_free(cl_env_kmem, cle);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; env = ERR_PTR(rc);<br>
&gt; &gt;&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&gt; &gt;&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cl_env_inc(CS_create);<br>
&gt; &gt;&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cl_env_inc(CS_total);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; env = ERR_PTR(-ENOMEM);<br>
&gt; &gt;&gt; @@ -623,7 &#43;611,6 @@ static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt;&nbsp; static void cl_env_fini(struct cl_env *cle)<br>
&gt; &gt;&gt;&nbsp; {<br>
&gt; &gt;&gt; -&nbsp; cl_env_dec(CS_total);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; lu_context_fini(&amp;cle-&gt;ce_lu.le_ctx);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; lu_context_fini(&amp;cle-&gt;ce_ses);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; kmem_cache_free(cl_env_kmem, cle);<br>
&gt; &gt;&gt; @@ -782,7 &#43;769,6 @@ void cl_env_put(struct lu_env *env, u16 *refcheck)<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; if (--cle-&gt;ce_ref == 0) {<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int cpu = get_cpu();<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cl_env_dec(CS_busy);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cle-&gt;ce_debug = NULL;<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cl_env_exit(cle);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>
&gt; &gt;&gt; @@ -903,7 &#43;889,6 @@ void cl_env_percpu_put(struct lu_env *env)<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cle-&gt;ce_ref--;<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; LASSERT(cle-&gt;ce_ref == 0);<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt; -&nbsp; cl_env_dec(CS_busy);<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cle-&gt;ce_debug = NULL;<br>
&gt; &gt;&gt;&nbsp; <br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; put_cpu();<br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; <br>
&gt; <br>
_______________________________________________<br>
lustre-devel mailing list<br>
lustre-devel@lists.lustre.org<br>
<a href="http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a><br>
</div>
</span></font></div>
</body>
</html>