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]
Date:	Tue, 19 Jun 2007 16:11:55 -0700
From:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To:	"David Miller" <davem@...emloft.net>
Cc:	<netdev@...r.kernel.org>, <jeff@...zik.org>,
	"Kok, Auke-jan H" <auke-jan.h.kok@...el.com>, <hadi@...erus.ca>,
	<kaber@...sh.net>
Subject: RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

> It's not being allocated at "compile time", it's being 
> allocated linearly into one block of ram in order to avoid 
> pointer derefs but it's still "dynamic" in that the size 
> isn't known until the alloc_netdev() call.
> 
> We do this trick all over the networking, TCP sockets are 3 
> or 4 different structures, all allocated into a linear block 
> of memory so that:
> 
> 1) only one memory allocation needs to be done for each object
>    create, this is not relevant for the net_device case
>    except in extreme examples bringing thousands of devices
>    up and down which I suppose someone can give a realistic
>    example of :-)
> 
> 2) each part can be accessed as an offset from the other instead
>    of a pointer deref which costs a cpu memory read
> 
> Please change the allocation strategy as I recommended, thanks.

Later this afternoon someone in my group came over and bonked me in the
head, and made this obvious to me.  Thanks for the follow-up; great
catch on the efficiency.  It's in my code now and is currently running
some test passes.

Thanks Dave,

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