From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Thu, 28 Jul 2016 05:53:18 +0000 Subject: Re: staging: lustre: One function call less in class_register_type() after error detection Message-Id: List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <566D7733.1030102@users.sourceforge.net> <56784D83.7080108@users.sourceforge.net> <56784F0C.6040007@users.sourceforge.net> <20151221234857.GA27079@kroah.com> <59d94e70-7476-728e-5f63-013557ec2db9@users.sourceforge.net> <0f9ecc7c-f98a-0296-563b-6fcfab459c31@users.sourceforge.net> <2BFF8460-ECEA-470D-ACD6-A9D7E540FE33@intel.com> In-Reply-To: <2BFF8460-ECEA-470D-ACD6-A9D7E540FE33@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Oleg Drokin Cc: devel@driverdev.osuosl.org, lustre-devel@lists.lustre.org, Andreas Dilger , Greg Kroah-Hartman , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Bhumika Goyal > This function is called several times during lustre module insert. > Namely it's called 5 times for 5 types: > osc, mdc, lov, lmv, mgc. Will any extra memory accesses matter for the successful execution in this use case? > It's not called any more than that, so it's not exactly a super hot-path function > to overoptimize it, and the failure is presumed to never happen too > (or the module would be non-functional). Did the assignment for the local variable "rc" with a well-known error code influence the run-time characteristics in unwanted ways? https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/staging/lustre/lustre/obdclass/genops.c?idj5b99a46bedc2cfbba96dec6d255c4b90af9ff8#n140 Regards, Markus