Thread (3 messages) 3 messages, 3 authors, 2009-05-27

Re: Net: ucc_geth ethernet driver optimization space

From: Li Yang <hidden>
Date: 2009-05-27 10:36:25
Also in: lkml, netdev

On Wed, May 27, 2009 at 1:08 PM, Liu Dave-R63238 [off-list ref] wr=
ote:
Guys,

The ucc_geth ethernet driver have dozens of strong sync read/write
operation, such as in_be32/16/8, out_be32/16/8.

all of them is sync read/write, it is very expensive for performance.
Totally agree.  That's one of my concerns right from the beginning.
For the critical patch, we can remove some unnecessary in_be(x),
out_be(x) with normal memory operation, and keep some necessary
memory barrier.

eg: BD access in the interrupt handler and start_xmit.

The BD operation only need the memory barrier between length/buffer
and status.

struct buffer descriptor {
=C2=A0 =C2=A0 =C2=A0 =C2=A0u16 status;
=C2=A0 =C2=A0 =C2=A0 =C2=A0u16 length;
=C2=A0 =C2=A0 =C2=A0 =C2=A0u32 buffer;
} __attribute__ ((packed));

struct buffer descriptor *BD;

BD->length =3D xxxx;
BD->buffer =3D yyyy;
wmb();
BD->status =3D zzzz;
The BD can reside either in memory or memory mapped region, which
makes the case more complex.

MMIO accesses need to use IO accessors for the sparse checking.  We
might make use of the __raw_*() accessors, but I'm not sure if it's
suitable for non-PCI buses on powerpc.  And also we need to pay
special attention to the problem described here:
http://lwn.net/Articles/198988/

- Leo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help