Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 1999 05:27:24 -0700
From:      David Greenman <dg@root.com>
To:        Marc Slemko <marcs@znep.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: libkvm sucks 
Message-ID:  <199905181227.FAA20767@implode.root.com>
In-Reply-To: Your message of "Mon, 17 May 1999 22:37:23 PDT." <Pine.BSF.4.05.9905172057160.24565-100000@alive.znep.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>The premise: libkvm is fatally flawed by design, and fixing it is not an
>easy proposition.
>
>The reasoning: reading from kernel data structures without any locking has
>obvious race conditions.  
>
>This is why any identd that uses libkvm sucks and gets into loops all the 
>time, etc.
>
>This is why netstat will often bail out in the middle with kvm errors on a
>busy machine with lots of TCP connections, especially if you slow it down
>by doing hostname lookups.
>
>In fact, on BSDI systems I have even seen identd hang the entire machine
>hard by reading from the wrong address that the IO APIC is mapped at (BSDI
>maps it starting at 0xffff0000, which much worse than a random address
>for accidental reads).
>
>In general, I'm no fan of the Linux style proc (by "Linux style" I mean
>going crazy with the types of info there and the huge amount of formatting
>done in the kernel), but in this case it can work a whole lot better, even
>if it is somewhat less efficient.
>
>I'm sure this isn't a new problem, but I don't recall hearing of any
>suggested solutions and I'm not aware of any alternative interface to get
>the same info on FreeBSD.  Anyone?

   Generally we've been moving towards using sysctl for reading kernel data.
procfs/kernfs is usually the wrong tool for the job in most cases (my
subjective opinion of course).

-DG

David Greenman
Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org
Creator of high-performance Internet servers - http://www.terasolutions.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905181227.FAA20767>