Re: [PATCH 1/4] ACPI: Add acpi_pr_() interfaces

Toshi Kani
2012-07-24T16:00:25Z

On Thu, 2012-07-19 at 17:43 -0600, Toshi Kani wrote:
> On Thu, 2012-07-19 at 16:32 -0600, Shuah Khan wrote:
> > On Thu, 2012-07-19 at 14:51 -0600, Toshi Kani wrote:
> >
> > > If your concern is actually a performance bottleneck in acpi_get_name()
> > > you found in the code, you should report it to the ACPI CA team.
> >
> > I have tried my best to get you to understand the problems in bigger
> > picture your patch set can exacerbate. Looking to somebody else to fix
> > the problems doesn't help. It doesn't look like we can come to an
> > agreement here, we just have to agree to disagree.
>
> I am not asking someone to fix it. I tried my best to explain that
> acpi_get_name() does not lead any performance issue when it is called in
> the error paths of ACPI drivers, and why we have to call it to obtain an
> object path info for error analysis. If you still believe there is a
> performance issue in calling acpi_get_name() under this context, please
> help us understand where the performance bottleneck is in the code. (I
> hope you just concerned it because it has "acpi_" prefix...) I will then
> work on the issue with the ACPI CA team.

I have measured acpi_pr_<level>() to make sure my statement is correct.
Here are the results:

Avg. acpi_get_name() 587 ns
Avg. printk() 3420 ns
Avg. kfree() 238 ns
Avg. acpi_get_time()+kfree() 825 ns

The results indicate that acpi_pr_<level>() has 20% increase of the time
compared to the regular printk(), which is less than 1 us. I believe
the results endorse my statement, and may not cause any performance
issue to the error paths of the ACPI drivers.

-Toshi

> Thanks,
> -Toshi
>
>
>
> > caio,
> > -- Shuah
> >
>