lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1291474159.2806.97.camel@edumazet-laptop>
Date:	Sat, 04 Dec 2010 15:49:19 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Junchang Wang <junchangwang@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: Question about __alloc_skb() speedup

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.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ