Re: [PATCH] IPVS: logging sizeof(struct ip_vs_conn) on startup

From: Hannes Eder
Date: Mon Jul 27 2009 - 06:34:55 EST


On Mon, Jul 27, 2009 at 11:25, Eric Dumazet<eric.dumazet@xxxxxxxxx> wrote:
> Well, ip_vs_conn_cache uses SLAB_HWCACHE_ALIGN, so this should be rounded up
> to L1 cache size. Or add "at least" like in line 1080
> of net/netfilter/ipvs/ip_vs_conn.c :
>
> IP_VS_DBG(0, "Each connection entry needs %Zd bytes at least\n",
> sizeof(struct ip_vs_conn));

Good point. Is there an easy way to figure out how much memory is
wasted for alignment by the slab allocator? Otherwise I vote for the
"at least" approach.

-Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/