Sense and insanity of using a cache

Thomas Graf tgraf at infradead.org
Mon Apr 19 06:50:32 EDT 2010


On Thu, Apr 08, 2010 at 03:54:34PM +0200, Wouter Verhelst wrote:
> I was wondering why libnl enforces the use of a cache; as we are talking
> to the local kernel, I would guess that any CPU cycles we spare by not
> having to ask the kernel something would be lost again by the mere fact
> that there's now a cache to manage.
> 
> Am I missing something? More importantly, if speedups is indeed why the
> cache exists, did anyone actually do any comparisons to see whether it
> does, indeed, cause the system to be faster?

Use of caches is not enforced, you may use nl_msg_parse() to parse messages
and have a callback function invoked for every parsed object instead of
having it added to a cache.



More information about the libnl mailing list