linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Worst case performance of up()
@ 2006-11-24 16:21 Adrian Cox
  2006-11-24 20:45 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 12+ messages in thread
From: Adrian Cox @ 2006-11-24 16:21 UTC (permalink / raw)
  To: linuxppc-dev

First the background: I've been investigating poor performance of a
Firewire capture application, running on a dual-7450 board with a 2.6.17
kernel. The kernel is based on a slightly earlier version of the
mpc7448hpc2 board port, using arch/powerpc, which I've not yet updated
to reflect the changes made when the board support entered the
mainstream kernel. 

The application runs smoothly on a single processor. On the dual
processor machine, the application sometimes suffers a drop in
frame-rate, simultaneous with high CPU usage by the Firewire kernel
thread.

Further investigation reveals that the kernel thread spends most of the
time in one line: up(&fi->complete_sem) in __queue_complete_req() in
drivers/iee1394/raw1394.c.  It seems that whenever the userspace thread
calling raw1394_read() is scheduled on the opposite CPU to the kernel
thread, the kernel thread takes much longer to execute up() - typically
10000 times longer.

Does anybody have any ideas what could make up() take so long in this
circumstance? I'd expect cache transfers to make the operation about 100
times slower, but this looks like repeated cache ping-pong between the
two CPUs.

-- 
Adrian Cox <adrian@humboldt.co.uk>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-12-08  4:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24 16:21 Worst case performance of up() Adrian Cox
2006-11-24 20:45 ` Benjamin Herrenschmidt
2006-11-27 21:02   ` Adrian Cox
2006-12-02 10:35     ` Adrian Cox
2006-12-02 11:15       ` Benjamin Herrenschmidt
2006-12-02 11:54         ` Adrian Cox
2006-12-02 20:52           ` Benjamin Herrenschmidt
2006-12-04 13:43             ` Adrian Cox
2006-12-04 20:25               ` Benjamin Herrenschmidt
2006-12-05 22:00                 ` Benjamin Herrenschmidt
2006-12-08  2:33                   ` Paul Mackerras
2006-12-08  3:10                     ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).