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: <47E2731A.3090401@trash.net>
Date:	Thu, 20 Mar 2008 15:22:18 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Pavel Emelyanov <xemul@...nvz.org>
CC:	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-2.6.26][VLAN]: Reduce memory consumed by vlan_group-s.

Pavel Emelyanov wrote:
> Currently each vlan_groupd contains 8 pointers on arrays with 512 
> pointers on struct net_device each :) Such a construction "in many 
> cases ... wastes memory".
> 
> My proposal is to allow for some of these arrays pointers be NULL,
> meaning that there are no devices in it. When a new device is added 
> to the vlan_group, the appropriate array is allocated.
> 
> The check in vlan_group_get_device's is safe, since the pointer
> vg->vlan_devices_arrays[x] can only switch from NULL to not-NULL.
> The vlan_group_prealloc_vid() is guarded with rtnl lock and is
> also safe.
> 
> I've checked (I hope that) all the places, that use these arrays 
> and found, that the register_vlan_dev is the only place, that can
> put a vlan device on an empty vlan_group.
> 
> Rough calculations shows, that after the patch a setup with a 
> single vlan dev (or up to 512 vlans with sequential vids) will 
> occupy approximately 8 times less memory.
> 
> The question I have is - does this patch makes sense, or a totally 
> new structures are required to store the vlan_devs?


Its an improvement, so I've applied it, thanks.

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