On Tue, Oct 19, 2010 at 1:47 PM, Eric Dumazet [off-list ref] wrote:
Le mardi 19 octobre 2010 à 13:24 +0800, Changli Gao a écrit :
quoted
And since ctl_table.data is initialized later, we don't need to initialize
the data member of the template variable unix_table.
The init cost is nothing, since its a data blob that must be there
anyway.
Yes. I have tried to avoid global variable unix_table and unix_path,
then I got a bigger kernel image, so I gave it up.
We could even avoid the kmemdup() if CONFIG_NET_NS is not set
It is a good idea. We can check if the NS is init_net before kmalloc and kfree.
I'll send a update patch later. Thanks.
--
Regards,
Changli Gao(xiaosuo@gmail.com)