lkml.org 
[lkml]   [2010]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [thisops uV3 15/18] Xen: Use this_cpu_ops
On Tue, 30 Nov 2010, Jeremy Fitzhardinge wrote:

> On 11/30/2010 11:07 AM, Christoph Lameter wrote:
> > static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)
> > {
> > - struct clock_event_device *evt = &__get_cpu_var(xen_clock_events);
> > irqreturn_t ret;
> >
> > ret = IRQ_NONE;
> > - if (evt->event_handler) {
> > - evt->event_handler(evt);
> > + if (__this_cpu_read(xen_clock_events.event_handler)) {
> > + __this_cpu_read(xen_clock_events.event_handler)(evt);
>
> Really? What code does this generate? If this is generating two
> segment-prefixed reads rather than getting the address and doing normal
> reads on it, then I don't think it is an improvement.

Lets drop that hunk. No point to do optimizations at that location then.

evt is also not defined then. Without the evt address determination via
__get_cpu_var we have at least 2 prefixed load and one address
calculation to figure out the parameter to pass. No win.



\
 
 \ /
  Last update: 2010-11-30 22:05    [W:0.284 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site