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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100830183620.GA3079@del.dom.local>
Date:	Mon, 30 Aug 2010 20:36:21 +0200
From:	Jarek Poplawski <jarkao2@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	shemminger@...tta.com, eric.dumazet@...il.com,
	herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [RFC] gro: Is it ok to share a single napi from several devs ?

On Mon, Aug 30, 2010 at 09:50:12AM -0700, David Miller wrote:
> From: Stephen Hemminger <shemminger@...tta.com>
> Date: Mon, 30 Aug 2010 08:57:21 -0700
> 
> > On Mon, 30 Aug 2010 06:42:31 +0000
> > Jarek Poplawski <jarkao2@...il.com> wrote:
> > 
> >> On 2010-08-29 20:39, Eric Dumazet wrote:
> >> > Le dimanche 29 aoĂťt 2010 Ă  10:06 -0700, David Miller a ĂŠcrit :
> >> >> From: Jarek Poplawski <jarkao2@...il.com>
> >> >> Date: Sun, 29 Aug 2010 11:59:51 +0200
> >> >>
> >> >>> Actually, when GRO compares napi->dev to skb->dev?
> >> >>
> >> >> Hmmm, I thought the code made a skb->dev comparison with the
> >> >> existing SKBs in the list when checking for same-flow matches.
> >> >>
> >> >> It doesn't, probably based upon the assumption that a NAPI
> >> >> instance maps to a unique device, the very topic we're
> >> >> discussing right now :-/
> >> >>
> >> >>
> >> > 
> >> > It does the check, Stephen added it in the commit I mentioned to start
> >> > this thread.
> >> > 
> >> > With net-next-2.6 this now reads :
> >> > 
> >> 
> >> Since Stephen didn't seem to miss this too much it seems quite obvious
> >> to me this check should be removed.
> > 
> > No. I just don't use that system much, breaking code for
> > sake of one comparison is ridiculous.
> 
> It's not working to begin with.

IMHO it should work yet. On the other hand, after removing this test
GRO should still work OK for these NICs in most cases, so it should be
treated as an optimization only. And it seems very unusual to keep such
optimizations at this level for such rare cases.

> I agree with Jarek that the check should be removed.  And GRO is one
> of those places that, precisely, even one memory reference removal
> can improve performance dramatically.

Hmm... I proposed removal when Stephen didn't defend it. Since he
seems to change his line, I'd prefer to be convinced I'm wrong,
preferably with some use/test case; most preferably from some
desperated user...

> Herbert spent a lot of time doing micro-optimizations to make GRO
> better and better, and the smallest things can turn out to make a huge
> difference there.

Anyway, after the last Eric's optimization, it's almost invisible...

Jarek P.
--
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