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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0904171604250.1016@gandalf.stny.rr.com>
Date:	Fri, 17 Apr 2009 16:06:16 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
cc:	Ingo Molnar <mingo@...e.hu>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 1/4] tracing: move __DO_TRACE out of line


On Fri, 17 Apr 2009, Jeremy Fitzhardinge wrote:

> Ingo Molnar wrote:
> > * Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> > 
> >   
> > > Taking __do_trace_sched_switch out of lines inserts this into the hot path
> > > (6 instructions, 31 bytes):
> > > 
> > >        cmpl    $0, __tracepoint_sched_switch+8(%rip)   #,
> > > __tracepoint_sched_switch.state
> > >        je      .L1748  #,
> > >        movq    -136(%rbp), %rdx        # next,
> > >        movq    -144(%rbp), %rsi        # prev,
> > >        movq    %rbx, %rdi      # rq,
> > >        call    __do_trace_sched_switch #
> > > .L1748:
> > >     
> > 
> > Hm, why isnt this off-line in the function? It's marked unlikely(), isnt it?
> >   
> 
> Yes, its unlikely().  I don't know why it doesn't move it; I've never seen
> unlikely() do anything useful.
> 

I wounder if it is because it is in context_switch(). Perhaps it moved it 
to the end of that function, but being that context_switch() is only used 
in schedule, it could have inlined it. The gcc was not smart enough to 
move this unlikely down to the end of the schedule function?

-- Steve

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