linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: David Laight <David.Laight@ACULAB.COM>,
	ByeoungWook Kim <quddnr145@gmail.com>
Cc: "kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"chaoming_li@realsil.com.cn" <chaoming_li@realsil.com.cn>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c
Date: Thu, 4 Feb 2016 09:43:58 -0600	[thread overview]
Message-ID: <56B371BE.1060805@lwfinger.net> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CCD61C8@AcuExch.aculab.com>

On 02/04/2016 03:48 AM, David Laight wrote:
> From: Larry Finger
>> Sent: 03 February 2016 19:45
> ...
>> The performance will depend on where you satisfy the condition. All switch cases
>> have the same execution time, but in the if .. else if .. else form, the earlier
>> tests execute more quickly. I'm not sure that one can make any blanket statement
>> about performance. Certainly, the switch version will be larger. For a switch
>> with 8 cases plus default, the object code if 43 bytes larger than the nested
>> ifs in a test program that I created. That is a significant penalty.
>
> There is also the penalty of the (likely) data cache miss reading the jump table.
> But given this code is all about generating a variable delay the execution
> speed is probably irrelevant.
>
> It would be much more interesting if the delay could be changed for sleeps.

Unfortunately, sleeping is not possible for the routines that call rtl_addr_delay().

Larry



  reply	other threads:[~2016-02-04 15:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  1:59 [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c Byeoungwook Kim
2016-02-03  2:07 ` Julian Calaby
2016-02-03 14:41 ` David Laight
2016-02-03 17:49   ` ByeoungWook Kim
2016-02-03 19:44     ` Larry Finger
2016-02-04  9:48       ` David Laight
2016-02-04 15:43         ` Larry Finger [this message]
2016-02-04 16:02           ` David Laight

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=56B371BE.1060805@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=David.Laight@ACULAB.COM \
    --cc=chaoming_li@realsil.com.cn \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quddnr145@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).