Re: [lustre-devel] staging: lustre: One function call less in class_register_type() after error detection

2016-07-30 Thread SF Markus Elfring
> In typical deployments outside of testing environment, this function is
> called 5 times every system boot and never again.

Does this information mean that a bit more fine-tuning is insignificant
at such a source code place?


>> 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?id=6a5b99a46bedc2cfbba96dec6d255c4b90af9ff8#n140
> 
> I am not sure what do you mean here.

I suggest to take another look at corresponding implementation details.

An error code is assigned to the variable "rc" before four memory
allocations succeeded so far.
We hope that this function will usually return zero as a constant
for the indication of a successful execution. I find that this variable
should not be touched in the preferred case.
Will such an unnecessary assignment reduce the execution speed a bit
for the desired file system initialisation?

Regards,
Markus


Re: [lustre-devel] staging: lustre: One function call less in class_register_type() after error detection

2016-07-30 Thread SF Markus Elfring
> In typical deployments outside of testing environment, this function is
> called 5 times every system boot and never again.

Does this information mean that a bit more fine-tuning is insignificant
at such a source code place?


>> 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?id=6a5b99a46bedc2cfbba96dec6d255c4b90af9ff8#n140
> 
> I am not sure what do you mean here.

I suggest to take another look at corresponding implementation details.

An error code is assigned to the variable "rc" before four memory
allocations succeeded so far.
We hope that this function will usually return zero as a constant
for the indication of a successful execution. I find that this variable
should not be touched in the preferred case.
Will such an unnecessary assignment reduce the execution speed a bit
for the desired file system initialisation?

Regards,
Markus


Re: [lustre-devel] staging: lustre: One function call less in class_register_type() after error detection

2016-07-29 Thread Oleg Drokin

On Jul 28, 2016, at 1:53 AM, SF Markus Elfring wrote:

>> 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?

I doubt it.

In typical deployments outside of testing environment, this function is
called 5 times every system boot and never again.

>> 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?id=6a5b99a46bedc2cfbba96dec6d255c4b90af9ff8#n140

I am not sure what do you mean here.




Re: [lustre-devel] staging: lustre: One function call less in class_register_type() after error detection

2016-07-29 Thread Oleg Drokin

On Jul 28, 2016, at 1:53 AM, SF Markus Elfring wrote:

>> 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?

I doubt it.

In typical deployments outside of testing environment, this function is
called 5 times every system boot and never again.

>> 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?id=6a5b99a46bedc2cfbba96dec6d255c4b90af9ff8#n140

I am not sure what do you mean here.