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
| ||
|
Date: Sat, 18 Apr 2009 09:44:28 +0200 From: Jiri Pirko <jpirko@...hat.com> To: Eric Dumazet <dada1@...mosbay.com> Cc: Stephen Hemminger <shemminger@...tta.com>, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, jgarzik@...ox.com, davem@...emloft.net, bridge@...ts.linux-foundation.org, fubar@...ibm.com, bonding-devel@...ts.sourceforge.net, kaber@...sh.net, mschmidt@...hat.com, ivecera@...hat.com Subject: Re: [PATCH 1/3] net: introduce a list of device addresses dev_addr_list (v3) Sat, Apr 18, 2009 at 09:35:32AM CEST, dada1@...mosbay.com wrote: >Jiri Pirko a écrit : >> Fri, Apr 17, 2009 at 05:33:15PM CEST, shemminger@...tta.com wrote: >> >> <snip> >> >>>> +struct netdev_hw_addr { >>>> + struct list_head list; >>>> + unsigned char addr[MAX_ADDR_LEN]; >>>> + int refcount; >>>> + struct rcu_head rcu_head; >>>> +}; >>> Minor nit, the ordering of elements cause holes that might not be >>> needed. >> >> Agree that ordering might be done better. Will do. >>> Space saving? is rcu_head needed or would using synchronize_net >>> make code cleaner and save space. >>> >> >> Well I originaly had this done by synchronize_rcu(). Eric argued that it might >> cause especially __hw_addr_del_multiple_ii() to run long and suggested to use >> call_rcu() instead. I plan to switch this to kfree_rcu() (or whatever it's >> called) once it hits the tree. >> > >Yes, and dont forget we wont save space, as we allocate a full >cache line to hold a 'struct netdev_hw_addr', since we dont want this >critical and read_mostly object polluted by a hot spot elsewhere in kernel... > >Considering this, letting 'rcu_head' at the end of structure, even if we >have an eventual hole on 64 bit arches is not really a problem, and IMHO >the best thing to do, as rcu_head is only used at dismantle time. I will order the struct better, there are archs with small cache line size where it makes sense. > >And yes, maybe kfree_rcu() will makes its way in kernel, eventually :) > >Thank you > > -- 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