Date: Thu, 27 Jul 2006 10:11:43 +0200 From: Andre Oppermann <andre@freebsd.org> To: Blue <Susan.Lan@zyxel.com.tw> Cc: freebsd-net@freebsd.org Subject: Re: [FreeBSD-6.1Release]About the removal of route cache in PCB Message-ID: <44C8753F.20905@freebsd.org> In-Reply-To: <44C82AA4.30306@zyxel.com.tw> References: <44C82AA4.30306@zyxel.com.tw>
next in thread | previous in thread | raw e-mail | index | archive | help
Blue wrote: > Hi, all: > > I am wondering why the FreeBSD-6.1 version removes the route cache in > PCB (struct inpcbin in_pcb.h)? Does the removal do anything good? Or its > existence would have potential problems? 'Cause in my opinion, the > removal would only produce extra time when emitting a packet since the > routing table lookup is unavoidable. So there's must be a good reason > for the change. The routing table pointer was complicating the SMP locking of the kernel and had some other drawbacks. With the pointer route changes would not be picked up immediately but only when packets got lost and caused ICMP responses. And for that many full PCB table walks had to be done. Simplicity was chosen and the route pointer was removed. The tradeoff isn't really bad as for most hosts the routing table is really small containing only the default route and some ARP entries. A lookup there is pretty much always a cache only operation. Only the locking overhead for the routing table lookup adds in but we would have to do much of it anyway to increment the refcount on the rtentry to send the packet. On servers with many connections the routing table could get quite large because of all these cloned routes and consume valuable kernel memory. No more routes for PCB's are cloned after the change. -- Andre
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44C8753F.20905>