lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] (no subject)


From: lukem . lwip
Subject: Re: [lwip-devel] (no subject)
Date: Fri, 19 Mar 2004 10:24:06 +1100 (EST)

On Thu, 18 Mar 2004, David Haas wrote:

> The advantage of pool pbufs is that they can be much faster to allocate,
> very important if you are allocating them in a driver. I really feel
> that they should not disappear.

I think the point of my message has been missed. I know the pool buffers
are faster to allocate and deallocate, but the profiling I've done shows
that the performance impact of allocation is very small. Therefore the
fact that it is faster doesn't actually make a significant difference to
the overall performance of the IP stack. I was hoping someone else could
coroborate my profiling results, because it appears to me that the pool
allocator may be a case of premature optimisation.

Although the time improvement of the pool allocator appears to be small,
it has significant space impact, which leads to the list of advantages for
removing it which I outlined in my previous message.

As a side note, those working on systems with large memory (which includes
myself) should also be concerned about the performance of the allocator
with respect to cache. I think a good general purpose allocator[0] may be
better in this case, but I don't have any results to prove it.

[0] for the sake of discussion, a general purpose allocator is any
allocator capable of supplying arbitrarily sized chunks of memory. lwIP's
mem_malloc() will do as an example (though it may or may not be "good").

--
Luke




reply via email to

[Prev in Thread] Current Thread [Next in Thread]