All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Evans <bevans@cray.com>
To: Fabian Huegel <fabian_huegel@web.de>,
	Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	Lai Siyao <lai.siyao@intel.com>,
	"John L . Hammond" <john.hammond@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	Ben Evans <bevans@cray.com>, NeilBrown <neilb@suse.com>
Cc: "lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kernel@i4.cs.fau.de" <linux-kernel@i4.cs.fau.de>
Subject: [lustre-devel] (no subject)
Date: Thu, 11 Jan 2018 17:25:20 +0000	[thread overview]
Message-ID: <D67D07B1.EB5E%jevans@cray.com> (raw)
In-Reply-To: <1515691022-22729-1-git-send-email-fabian_huegel@web.de>

I've been working off and on with this.  Since you're getting into the
counters in a couple of the patches, part of the reason for all the
#defines here are because MDC, MDT and OST counters are all shoved into
the same array dynamically, sometimes.  It would be a much cleaner
approach to have a separate array for the MDC stats, then print them
conditionally.

This would reduce all of the calls to these macros to counter increments.

-Ben Evans

On 1/11/18, 12:16 PM, "Fabian Huegel" <fabian_huegel@web.de> wrote:

>We cleaned up a lot of checkpatch errors and warnings in obd_class.h,
>but there are still some CHECKs and two warnings about flow control
>inside macros left.
>
>Changing those macros to inline functions would probably
>be a good idea, unfortunatly it's not straightforward since they use
>'#op' to print the name of the operation.
>
>We also did some aligning to make the code more readable and removed
>an unnecessary macro.
>
>We only tested, that the kernel still compiles and the lustre kernel
>module loads successfully, but given the harmless nature of these
>changes we don't expect any problems.
>
>The patches are based on the staging-testing branch of the staging tree.
>

WARNING: multiple messages have this Message-ID (diff)
From: Ben Evans <bevans@cray.com>
To: Fabian Huegel <fabian_huegel@web.de>,
	Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	Lai Siyao <lai.siyao@intel.com>,
	"John L . Hammond" <john.hammond@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	Ben Evans <bevans@cray.com>, NeilBrown <neilb@suse.com>
Cc: "lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kernel@i4.cs.fau.de" <linux-kernel@i4.cs.fau.de>
Subject: Re:
Date: Thu, 11 Jan 2018 17:25:20 +0000	[thread overview]
Message-ID: <D67D07B1.EB5E%jevans@cray.com> (raw)
In-Reply-To: <1515691022-22729-1-git-send-email-fabian_huegel@web.de>

I've been working off and on with this.  Since you're getting into the
counters in a couple of the patches, part of the reason for all the
#defines here are because MDC, MDT and OST counters are all shoved into
the same array dynamically, sometimes.  It would be a much cleaner
approach to have a separate array for the MDC stats, then print them
conditionally.

This would reduce all of the calls to these macros to counter increments.

-Ben Evans

On 1/11/18, 12:16 PM, "Fabian Huegel" <fabian_huegel@web.de> wrote:

>We cleaned up a lot of checkpatch errors and warnings in obd_class.h,
>but there are still some CHECKs and two warnings about flow control
>inside macros left.
>
>Changing those macros to inline functions would probably
>be a good idea, unfortunatly it's not straightforward since they use
>'#op' to print the name of the operation.
>
>We also did some aligning to make the code more readable and removed
>an unnecessary macro.
>
>We only tested, that the kernel still compiles and the lustre kernel
>module loads successfully, but given the harmless nature of these
>changes we don't expect any problems.
>
>The patches are based on the staging-testing branch of the staging tree.
>

  parent reply	other threads:[~2018-01-11 17:25 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 17:16 Fabian Huegel
2018-01-11 17:16 ` [PATCH 1/8] staging: lustre: Enclose complex macros in parentheses Fabian Huegel
2018-01-15 15:00   ` [lustre-devel] " Greg Kroah-Hartman
2018-01-15 15:00     ` Greg Kroah-Hartman
2018-01-11 17:16 ` [PATCH 2/8] staging: lustre: Enclose complex macros in do-while loops Fabian Huegel
2018-01-11 17:16 ` [PATCH 3/8] staging: lustre: Remove DECLARE_LU_VARS macro Fabian Huegel
2018-01-11 17:16 ` [PATCH 4/8] staging: lustre: Fix comment style Fabian Huegel
2018-01-15 15:02   ` [lustre-devel] " Greg Kroah-Hartman
2018-01-15 15:02     ` Greg Kroah-Hartman
2018-01-18 15:51     ` staging: lustre: Cleanup of obd_class.h Fabian Huegel
2018-01-18 15:51       ` [PATCH 1/2] staging: lustre: Fix comment style Fabian Huegel
2018-01-20  1:53         ` [lustre-devel] " Joe Perches
2018-01-20  1:53           ` Joe Perches
2018-01-22 10:37           ` [lustre-devel] " Greg Kroah-Hartman
2018-01-22 10:37             ` Greg Kroah-Hartman
2018-01-18 15:51       ` [PATCH 2/2] staging: lustre: Align struct member identifiers Fabian Huegel
2018-01-11 17:16 ` [PATCH 5/8] staging: lustre: Add identifier names to function declarations Fabian Huegel
2018-01-11 17:17 ` [PATCH 6/8] staging: lustre: Fix overlong lines Fabian Huegel
2018-01-19  3:36   ` [lustre-devel] " Dilger, Andreas
2018-01-19  3:36     ` Dilger, Andreas
2018-01-11 17:17 ` [PATCH 7/8] staging: lustre: Align struct member identifiers Fabian Huegel
2018-01-11 17:17 ` [PATCH 8/8] staging: lustre: Align backslashes in multi-line macros Fabian Huegel
2018-01-11 17:25 ` Ben Evans [this message]
2018-01-11 17:25   ` Ben Evans
  -- strict thread matches above, loose matches on Subject: below --
2017-01-05  0:16 [lustre-devel] (no subject) Di
2017-01-10 20:15 ` Amir Shehata
2017-01-10 22:06   ` Christopher J. Morrone
2017-01-11  1:08     ` Amir Shehata
2017-01-11  4:18       ` Dilger, Andreas
2017-01-11 23:20         ` Christopher J. Morrone
2017-01-16 21:25           ` James Simmons
2017-01-16 21:05       ` James Simmons
2017-01-16 21:02     ` James Simmons
2017-01-17 21:32       ` Christopher J. Morrone
2017-01-18 20:10       ` Amir Shehata
     [not found] <000c01cae6ee$1d4693d0$57d3bb70$@barton@oracle.com>
2010-04-29  1:25 ` [Lustre-devel] " di.wang
2010-04-29  1:49   ` Andreas Dilger
2010-04-29  2:04     ` di.wang
2009-03-27  5:23 sethpn at gmail.com

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=D67D07B1.EB5E%jevans@cray.com \
    --to=bevans@cray.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabian_huegel@web.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.hammond@intel.com \
    --cc=jsimmons@infradead.org \
    --cc=lai.siyao@intel.com \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=neilb@suse.com \
    --cc=oleg.drokin@intel.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 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.