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: <1303209787.3480.9.camel@edumazet-laptop>
Date:	Tue, 19 Apr 2011 12:43:07 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	monstr@...str.eu
Cc:	netdev@...r.kernel.org
Subject: Re: Add NAPI support to ll_temac driver

Le mardi 19 avril 2011 à 11:35 +0200, Michal Simek a écrit :
> Hi,
> 
> I would like to try to add NAPI support for ll_temac and look if help us to 
> improve performance on Microblaze system. I would expect that bandwidth should 
> be increased.
> We have the second non mainline driver which use tasklets and it provides better 
>   performance than mainline driver but not so big that's why I think that NAPI 
> can increase performance.
> 
> Can you please point me to any driver which I could use as a template?
> Or any developer guide to do so.
> 
> Do you know any other option how to improve driver performance on low speed cpu?
> 
> I have found that driver spends a lot of time on skb allocation and preallocated 
> SKBs help a little bit. I have done a test where I increased number of 
> preallocated BDs(SKBs) for rx to 35000 and disable new BD(SKB) allocation in 
> rx_irq. 35000 BDs is setup because I need them to successfully finish netperf 
> test. I have got 25% bandwidth increasing.
> 
> It will be also nice to be able to allocate several BDs(SKBs) which could be 
> faster than allocate them in sequence.

Depends if your cpu has some cache. The best performance is to try to
get high cache hit ratios.

One possible way to get better performance is to change driver to
allocate skbs only right before calling netif_rx(), so that you dont
have to access cold sk_buff data twice (once when allocating skb and put
it in ring buffer, a second time when receiving frame)

drivers/net/niu.c is a good example for this (NAPI + netdev_alloc_skb()
just in time + pull in skbhead only first cache line of packet)

drivers/net/ftmac100.c is also a recent driver (and probably a better
start with less complex hardware than NIU) using these tricks

{ skb = netdev_alloc_skb_ip_align(netdev, 128);
 __pskb_pull_tail(skb, min(length, 64)); 
}


--
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