[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1607281648110.19896@nanos>
Date: Thu, 28 Jul 2016 16:50:48 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Gaurav Jindal (Gaurav Jindal)" <Gaurav.Jindal@...eadtrum.com>
cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Sanjeev Yadav (Sanjeev Kumar Yadav)" <Sanjeev.Yadav@...eadtrum.com>
Subject: Re: [PATCH]optimize error handling in tick_check_new_device
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
Powered by blists - more mailing lists