lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] clockevents: Hide CLOCK_EVT_STATE_* from rest of the kernel
On 20-05-15, 15:09, Thomas Gleixner wrote:
> On Wed, 20 May 2015, Viresh Kumar wrote:

> They look at clock_event_mode and not at state, right?

Yeah, it was all useful (that's what I thought initially, but not
anymore) only when we migrate some drivers to the new per-state APIs.

> And that way we add the overhead of a full function call to those
> drivers for the interrupt hot path?

Honestly, I didn't realize that this can be a blocker. My bad.

> Of course you should have done that analysis before posting some
> random helper functions.

I did looked at all the drivers few days back, but failed to give a
summary similar to yours. No excuses.

> Lets look how useful these functions are for the various use cases
>
> #1) Adds function call over head to the timer interrupt
>
> Hot path does matter and that function call is a regression. So
> that's a NONO

> Now explain me how your magic functions help. For most of the cases
> they would be a performance regression. And for the rest they really
> do not matter at all.

They wouldn't help at all in that case.

So, probably we are left with following choices:

- Maintain state internally within the driver. SMP cases need per-cpu
storage as clkevt devices are per-cpu. Probably that's a NONO as
well ?

- Use CLK_EVT_STATE_* directly in drivers (similar to the way we use
CLK_EVT_MODE_* today).

- Write the routines I proposed as macros or inline functions in
clockchips.h, and use them. Of course that wouldn't stop exposing
CLK_EVT_STATE_* to rest of the kernel.

- Something else ?

Which one do you suggest ?

--
viresh


\
 
 \ /
  Last update: 2015-05-20 16:21    [W:0.052 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site