afexists()

Bjoern A. Zeeb bz at FreeBSD.org
Wed Jun 1 00:19:40 UTC 2011


On May 31, 2011, at 9:14 PM, Doug Barton wrote:

Hey,

> I don't have any specific objections to this change, although adding more calls to afexists() highlights an issue I addressed previously in looking at network.subr. On my system (with IPv6) it's called over 25 times at each boot, which given that it's a moderately expensive test indicates an opportunity for optimization.

Yeah, it's still a lot cheaper than going into the various configurations running ifconfigs etc.  Especially it does not yield errors this way;)


> Attached is a patch which caches a positive result for support for a given address family. I don't think caching negative results is a good idea since that could change as the boot progresses.

Not yet for inet or inet6 (or ipx I think) but atm might be loadable.  Looking ahead that's certainly true though maybe also considering virtualization maybe.

> 
> I plan to commit this on Friday if there are no objections.

I am not sure it helps but I see no regression, so if you want, feel free to go ahead.

Bjoern

-- 
Bjoern A. Zeeb                                 You have to have visions!
         Stop bit received. Insert coin for new address family.



More information about the freebsd-rc mailing list