lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150520140411.GB22904@linux>
Date:	Wed, 20 May 2015 19:34:11 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ