All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 11/21] lustre: cl_object: remove vestigial debugging.
Date: Wed, 13 Feb 2019 09:12:11 +1100	[thread overview]
Message-ID: <87ftssfyh0.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <alpine.LFD.2.21.1902120504270.3631@casper.infradead.org>

On Tue, Feb 12 2019, James Simmons wrote:

>> >> cl_env_inc() and cl_env_dec() don't do anything,
>> >> so discard them.
>> >
>> > I don't know about this one. I saw Andreas response as well. 
>> > So this was apart of "LU-744 obdclass: revise stats for cl_object cache"
>> > In the end it was turned off by default in the OpenSFS branch since it
>> > made performance take a hit. To enable in OpenSFS branch you have to run
>> > ./configure --enable-pgstate-track. We have a few like this for Lustre so
>> > I was going to bring this up. Do we want to remove this work for both the
>> > upstream client as well as OpenSFS tree or properly implement this by
>> > making it a Kconfig option when CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK is
>> > enabled? Its just a matter of porting OpenSFS commit 
>> > 5cae09a2409dcd396a1ee7be1eca7d3bbf77365e
>> >
>> > What do you think?
>> 
>> How useful are these stats?
>> Stats that are never compiled in aren't likely to tell you much :-)
>> 
>> Has any thought been given to per-cpu stats counting?  That seems to be
>> the preferred approach for high-frequency accounting.
>> 
>> I think having a CONFIG option to enable expensive consistency checks is
>> a good idea - developers will enable it when they don't care about
>> performance.
>> Having a CONFIG option for expensive performance stats seems... weird.
>> Who would use it, and how meaningful would the number be?
>
> Which per-cpu stats are you talking about?

include/linux/percpu_counter.h I guess - or something similar.

NeilBrown



>                                             I know perf can do this kind of
> profiling with performance counters but I don't think you can use those
> with cl_pages specifically. I know the lustre developers really dislike
> trace point but this could be one of those cases where it makes sense.
>  
>> NeilBrown
>> 
>> 
>> >
>> >> Signed-off-by: NeilBrown <neilb@suse.com>
>> >> ---
>> >>  drivers/staging/lustre/lustre/obdclass/cl_object.c |   15 ---------------
>> >>  1 file changed, 15 deletions(-)
>> >> 
>> >> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
>> >> index d71a680660da..1e704078664e 100644
>> >> --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
>> >> +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
>> >> @@ -565,14 +565,6 @@ struct cl_env {
>> >>  	void		       *ce_debug;
>> >>  };
>> >>  
>> >> -static void cl_env_inc(enum cache_stats_item item)
>> >> -{
>> >> -}
>> >> -
>> >> -static void cl_env_dec(enum cache_stats_item item)
>> >> -{
>> >> -}
>> >> -
>> >>  static void cl_env_init0(struct cl_env *cle, void *debug)
>> >>  {
>> >>  	LASSERT(cle->ce_ref == 0);
>> >> @@ -581,7 +573,6 @@ static void cl_env_init0(struct cl_env *cle, void *debug)
>> >>  
>> >>  	cle->ce_ref = 1;
>> >>  	cle->ce_debug = debug;
>> >> -	cl_env_inc(CS_busy);
>> >>  }
>> >>  
>> >>  static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)
>> >> @@ -611,9 +602,6 @@ static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)
>> >>  		if (rc != 0) {
>> >>  			kmem_cache_free(cl_env_kmem, cle);
>> >>  			env = ERR_PTR(rc);
>> >> -		} else {
>> >> -			cl_env_inc(CS_create);
>> >> -			cl_env_inc(CS_total);
>> >>  		}
>> >>  	} else {
>> >>  		env = ERR_PTR(-ENOMEM);
>> >> @@ -623,7 +611,6 @@ static struct lu_env *cl_env_new(u32 ctx_tags, u32 ses_tags, void *debug)
>> >>  
>> >>  static void cl_env_fini(struct cl_env *cle)
>> >>  {
>> >> -	cl_env_dec(CS_total);
>> >>  	lu_context_fini(&cle->ce_lu.le_ctx);
>> >>  	lu_context_fini(&cle->ce_ses);
>> >>  	kmem_cache_free(cl_env_kmem, cle);
>> >> @@ -782,7 +769,6 @@ void cl_env_put(struct lu_env *env, u16 *refcheck)
>> >>  	if (--cle->ce_ref == 0) {
>> >>  		int cpu = get_cpu();
>> >>  
>> >> -		cl_env_dec(CS_busy);
>> >>  		cle->ce_debug = NULL;
>> >>  		cl_env_exit(cle);
>> >>  		/*
>> >> @@ -903,7 +889,6 @@ void cl_env_percpu_put(struct lu_env *env)
>> >>  	cle->ce_ref--;
>> >>  	LASSERT(cle->ce_ref == 0);
>> >>  
>> >> -	cl_env_dec(CS_busy);
>> >>  	cle->ce_debug = NULL;
>> >>  
>> >>  	put_cpu();
>> >> 
>> >> 
>> >> 
>> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20190213/5a778fd0/attachment.sig>

  parent reply	other threads:[~2019-02-12 22:12 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  0:03 [lustre-devel] [PATCH 00/21] lustre: Assorted cleanups for obdclass NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 03/21] lustre: obdclass: use list_sort() to sort a list NeilBrown
2019-02-08  0:13   ` Andreas Dilger
2019-02-11  0:39   ` James Simmons
2019-02-11  1:05     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 06/21] lustre: use list_first_entry() in lnet/lnet subdirectory NeilBrown
2019-02-08  0:44   ` Andreas Dilger
2019-02-11  1:46   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 01/21] lustre: obdclass: discard csi_end_io NeilBrown
2019-02-07  0:20   ` Andreas Dilger
2019-02-11  0:19   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 02/21] lustre: obd_class: remove csi_barrier from struct cl_sync_io NeilBrown
2019-02-08  0:09   ` Andreas Dilger
2019-02-11  0:24     ` NeilBrown
2019-02-11  0:34   ` James Simmons
2019-02-11  1:09     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 04/21] lustre: use list*entry macros in place of container_of() NeilBrown
2019-02-08  0:25   ` Andreas Dilger
2019-02-11  1:32   ` James Simmons
2019-02-11  3:14     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 05/21] lustre: use list_first_entry() in lustre subdirectory NeilBrown
2019-02-08  0:31   ` Andreas Dilger
2019-02-11  0:13     ` NeilBrown
2019-02-11  1:45   ` James Simmons
2019-02-11  3:08     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 20/21] lustre: obdclass: fix module load locking NeilBrown
2019-02-13  1:53   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 14/21] lustre: make ccc_users in cl_client_cache a refcount_t NeilBrown
2019-02-08  5:46   ` Andreas Dilger
2019-02-11  4:01   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 16/21] lustre: obdclass: normalize a switch statement NeilBrown
2019-02-08  5:57   ` Andreas Dilger
2019-02-11  4:03   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 07/21] lustre: use list_first_entry() in lnet/klnds subdirectory NeilBrown
2019-02-08  0:59   ` Andreas Dilger
2019-02-11  0:34     ` NeilBrown
2019-02-11  1:47   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 13/21] lustre: make cp_ref in cl_page a refcount_t NeilBrown
2019-02-08  5:45   ` Andreas Dilger
2019-02-11  4:00   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 08/21] lustre: use list_first_entry() throughout NeilBrown
2019-02-08  1:06   ` Andreas Dilger
2019-02-11  1:48   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 17/21] lustre: obdclass: result of try_module_get() should not be ignored NeilBrown
2019-02-08  5:58   ` Andreas Dilger
2019-02-11  4:22   ` James Simmons
2019-02-11  5:01     ` NeilBrown
2019-02-11  5:09       ` [lustre-devel] [PATCH] lustre: don't manage module refs in obd_class_open/close NeilBrown
2019-02-12  4:17         ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 19/21] lustre: obdclass: avoid races in class_register_type() NeilBrown
2019-02-08  6:41   ` Andreas Dilger
2019-02-11  0:58     ` NeilBrown
2019-02-12  5:03   ` James Simmons
2019-02-14  3:43     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 11/21] lustre: cl_object: remove vestigial debugging NeilBrown
2019-02-08  1:31   ` Andreas Dilger
2019-02-11  0:48     ` NeilBrown
2019-02-11  2:04   ` James Simmons
2019-02-11  3:25     ` NeilBrown
2019-02-12  5:19       ` James Simmons
2019-02-12 13:56         ` Patrick Farrell
2019-02-12 22:12         ` NeilBrown [this message]
2019-02-13  0:19           ` James Simmons
2019-02-13  0:29             ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 10/21] lustre: obdclass: use cl_object_for_each where appropriate NeilBrown
2019-02-08  1:10   ` Andreas Dilger
2019-02-11  0:42     ` NeilBrown
2019-02-11  4:19       ` James Simmons
2019-02-15 18:15       ` Andreas Dilger
2019-02-11  1:57   ` James Simmons
2019-02-11  3:19     ` NeilBrown
2019-02-07  0:03 ` [lustre-devel] [PATCH 18/21] lustre: move debug.c from obdclass to obdecho NeilBrown
2019-02-08  6:02   ` Andreas Dilger
2019-02-11  4:17   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 15/21] lustre: obdclass: char obd_ioctl_getdata type NeilBrown
2019-02-08  5:56   ` Andreas Dilger
2019-02-11  0:52     ` NeilBrown
2019-02-11  4:03   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 21/21] lustre: make exp_refcount in obd_export a refcount_t NeilBrown
2019-02-08  7:07   ` Andreas Dilger
2019-02-11  4:18   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 09/21] lustre: use list_last_entry() throughout NeilBrown
2019-02-08  1:07   ` Andreas Dilger
2019-02-11  1:48   ` James Simmons
2019-02-07  0:03 ` [lustre-devel] [PATCH 12/21] lustre: cl_page.c: remove PINVRNT() NeilBrown
2019-02-08  5:43   ` Andreas Dilger
2019-02-11  4:01   ` James Simmons

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=87ftssfyh0.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=lustre-devel@lists.lustre.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.