From: Li Yang <leoli@freescale.com>
To: Liu Dave-R63238 <DaveLiu@freescale.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@ozlabs.org
Subject: Re: Net: ucc_geth ethernet driver optimization space
Date: Wed, 27 May 2009 18:36:14 +0800 [thread overview]
Message-ID: <2a27d3730905270336n120f7652yad269858ff456c64@mail.gmail.com> (raw)
In-Reply-To: <D7CCA83BB0796C49BC0BB53B6AB1208934920A@zch01exm21.fsl.freescale.net>
On Wed, May 27, 2009 at 1:08 PM, Liu Dave-R63238 <DaveLiu@freescale.com> 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
prev parent reply other threads:[~2009-05-27 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 5:08 Net: ucc_geth ethernet driver optimization space Liu Dave-R63238
2009-05-27 6:49 ` Joakim Tjernlund
2009-05-27 10:36 ` Li Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a27d3730905270336n120f7652yad269858ff456c64@mail.gmail.com \
--to=leoli@freescale.com \
--cc=DaveLiu@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).