All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Denys Vlasenko <dvlasenk@redhat.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Johannes Berg <johannes.berg@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iwlwifi: Deinline iwl_{read,write}{8,32}
Date: Tue, 14 Jul 2015 15:38:14 +0300	[thread overview]
Message-ID: <55A502B6.5090806@cogentembedded.com> (raw)
In-Reply-To: <1436876558-6674-1-git-send-email-dvlasenk@redhat.com>

Hello.

On 7/14/2015 3:22 PM, Denys Vlasenko wrote:

> With CONFIG_IWLWIFI_DEVICE_TRACING=y, these functions are rather large,
> too big for inlining.

> With this .config: http://busybox.net/~vda/kernel_config,
> after uninlining these functions have sizes and callsite counts
> as follows:

> iwl_read32  475 bytes, 51 callsites
> iwl_write32 477 bytes, 90 callsites
> iwl_write8  493 bytes, 3 callsites

> Reduction in size is about 74,000 bytes:

>      text     data      bss       dec     hex filename
> 90758147 17226024 36659200 144643371 89f152b vmlinux0
> 90687995 17221928 36659200 144569123 89df323 vmlinux.after

> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Johannes Berg <johannes.berg@intel.com>
> CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Cc: "John W. Linville" <linville@tuxdriver.com>
> Cc: Intel Linux Wireless <ilw@linux.intel.com>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
> ---
>   drivers/net/wireless/iwlwifi/iwl-io.c |  7 +++++++
>   drivers/net/wireless/iwlwifi/iwl-io.h | 39 +++++++++++++++++++++--------------
>   2 files changed, 30 insertions(+), 16 deletions(-)

[...]
> diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
> index 705d12c..3c9d2a8 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-io.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-io.h
> @@ -32,24 +32,31 @@
>   #include "iwl-devtrace.h"
>   #include "iwl-trans.h"
>
[...]
> +#define IWL_READ_WRITE(static_inline) \
> +static_inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) \
> +{ \
> +	trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); \
> +	iwl_trans_write8(trans, ofs, val); \
> +} \
> +static_inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) \
> +{ \
> +	trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); \
> +	iwl_trans_write32(trans, ofs, val); \
> +} \
> +static_inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs) \
> +{ \
> +	u32 val = iwl_trans_read32(trans, ofs); \
> +	trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); \
> +	return val; \
>   }
[...]
> +#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING)
> +IWL_READ_WRITE(static inline)

    Not static_inline?

> +#else
> +void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val);
> +void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val);
> +u32 iwl_read32(struct iwl_trans *trans, u32 ofs);
> +#endif

MBR, Sergei


  reply	other threads:[~2015-07-14 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 12:22 [PATCH] iwlwifi: Deinline iwl_{read,write}{8,32} Denys Vlasenko
2015-07-14 12:38 ` Sergei Shtylyov [this message]
2015-07-14 12:41   ` Denys Vlasenko
2015-07-15 17:49     ` Emmanuel Grumbach
2015-08-09 19:38       ` Denys Vlasenko
2015-08-24  9:53         ` Emmanuel Grumbach

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=55A502B6.5090806@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=dvlasenk@redhat.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=ilw@linux.intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.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.