From: Thomas Gleixner <tglx@linutronix.de>
To: "Gaurav Jindal (Gaurav Jindal)" <Gaurav.Jindal@spreadtrum.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Sanjeev Yadav (Sanjeev Kumar Yadav)"
<Sanjeev.Yadav@spreadtrum.com>
Subject: Re: [PATCH]optimize error handling in tick_check_new_device
Date: Thu, 28 Jul 2016 16:50:48 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1607281648110.19896@nanos> (raw)
In-Reply-To: <20160727120609.GA3773@gauravjindalubtnb.del.spreadtrum.com>
On Wed, 27 Jul 2016, Gaurav Jindal (Gaurav Jindal) wrote:
> In the function tick_check_new_device, module error is handled after checking
> if the newdev should go as broadcast-installation device in the functions
> tick_check_percpu and tick_check_preferred. In case the try_module_get returns
> false, the above 2 calls are extra thus wasting CPU cycles.
This is hardly a fast path so the extra cycles do not matter at all. As a
result of your change you leak a module reference when the 'goto out_bc' is
taken. So I prefer the existing correct version over a pretty uninteresting
speedup.
Thanks,
tglx
prev parent reply other threads:[~2016-07-28 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 12:06 Gaurav Jindal (Gaurav Jindal)
2016-07-27 12:23 ` Nicolai Stange
2016-07-28 14:50 ` Thomas Gleixner [this message]
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=alpine.DEB.2.11.1607281648110.19896@nanos \
--to=tglx@linutronix.de \
--cc=Gaurav.Jindal@spreadtrum.com \
--cc=Sanjeev.Yadav@spreadtrum.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®