[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343406533.2626.13104.camel@edumazet-glaptop>
Date: Fri, 27 Jul 2012 18:28:53 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: David Miller <davem@...emloft.net>, alexander.duyck@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH 00/16] Remove the ipv4 routing cache
On Fri, 2012-07-27 at 09:23 -0700, Eric W. Biederman wrote:
> I am familiar. But does hardware prefetching make a difference
> if your object is less than 64 bytes?
>
Apparently yes, if the prefetch touches a dirtied neighbour cache line.
> I don't believe only allocating 64 bytes will be a problem,
> as no one else well be dirtying your cache line.
>
> I suppose you could run into pathologies where your object
> is 3*64 bytes in size, but your expression doesn't handle
> that case either.
>
Sure, but in most cases fib objects are under 128 bytes.
> The other alternative to guarantee very good cache behavior is
> to ensure you are allocating a power of two size up to some limit,
> perhaps page size.
>
Good idea.
> My point is the magic 128 likely requires an explicatory comment and I
> think the net result is you have encoded something fragile that is good
> for testing but that will in the fullness of time do strange things that
> will be easy to overlook.
Sure, I'll send a v2, 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