Net: ucc_geth ethernet driver optimization space

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Liu Dave-R63238
Date: Tuesday, May 26, 2009 - 10:08 pm

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.

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 {
	u16 status;
	u16 length;
	u32 buffer;
} __attribute__ ((packed));

struct buffer descriptor *BD;

BD->length = xxxx;
BD->buffer = yyyy;
wmb();
BD->status = zzzz;

For powerpc, eieio is enough for 60x, mbar 1 is enough for e500.
Of couse, also need the memory clobber to avoid the compiler
reorder between them.

Thanks, Dave


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Net: ucc_geth ethernet driver optimization space, Liu Dave-R63238, (Tue May 26, 10:08 pm)
Re: Net: ucc_geth ethernet driver optimization space, Joakim Tjernlund, (Tue May 26, 11:49 pm)