From: Eric Dumazet <eric.dumazet@gmail.com>
To: Junchang Wang <junchangwang@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Question about __alloc_skb() speedup
Date: Sat, 04 Dec 2010 15:49:19 +0100 [thread overview]
Message-ID: <1291474159.2806.97.camel@edumazet-laptop> (raw)
In-Reply-To: <1291474058.2806.96.camel@edumazet-laptop>
Le samedi 04 décembre 2010 à 15:47 +0100, Eric Dumazet a écrit :
> Le samedi 04 décembre 2010 à 22:18 +0800, Junchang Wang a écrit :
>
> > I added the prefetchw() in pktgen as follows:
> >
> > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> > index 2953b2a..512f1ae 100644
> > --- a/net/core/pktgen.c
> > +++ b/net/core/pktgen.c
> > @@ -2660,6 +2660,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
> > sprintf(pkt_dev->result, "No memory");
> > return NULL;
> > }
> > + prefetchw(skb->data);
> >
> > skb_reserve(skb, datalen);
> >
> > This time, I can check it without rebooting the system. The performance
> > gain is 4%-5%(stable). Does 4% worth submitting it to the kernel?
>
> Yes I believe so, pktgen being very specific, but I have few questions :
>
> Is it with SLUB or SLAB ?
>
> How many buffers in TX ring on you nic (ethtool -g eth0) ?
>
> What is the datalen value here ? (you prefetch, then advance skb->data)
>
> 32 or 64bit kernel ?
>
> How many pps do you get before and after patch ?
>
> Thanks
>
Also, dont forget to include the prefetchw() in fill_packet_ipv6() as
well when submitting your patch.
next prev parent reply other threads:[~2010-12-04 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 10:14 Question about __alloc_skb() speedup Junchang Wang
2010-12-03 10:50 ` Eric Dumazet
2010-12-04 14:18 ` Junchang Wang
2010-12-04 14:47 ` Eric Dumazet
2010-12-04 14:49 ` Eric Dumazet [this message]
2010-12-05 10:56 ` Junchang Wang
2010-12-05 16:49 ` Eric Dumazet
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=1291474159.2806.97.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=junchangwang@gmail.com \
--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