Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 1999 10:49:39 -0700 (PDT)
From:      Marc Slemko <marcs@znep.com>
To:        Richard Wackerbarth <rkw@dataplex.net>, "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: libkvm sucks
Message-ID:  <Pine.BSF.4.05.9905181025090.24565-100000@alive.znep.com>
In-Reply-To: <37413591.A88872AD@newsguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 May 1999, Richard Wackerbarth wrote:

> On Mon, 17 May 1999, Marc Slemko wrote:
> 
> > The reasoning: reading from kernel data structures without any locking has
> > obvious race conditions.  
> [...]
> 
> > 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.
> 
> I agree that locking, in one form or another, is required to traverse
> dynamic chains.
> 
> However, this applies to the functionality wherever it is implemented.
> Moving the formatting to the kernel does not change anything.
> 
> If you are concerned about the time that it takes to do hostname lookups,
> that time is not any shorter in the kernel.

I never suggested it was.  The only thing I was saying is that
doing the locking from libkvm ranges between difficult and impossible
due to the API, and even if the libkvm API was different you still
can't have (or want, IMHO) userland arbitrarily locking kernel data
structures without doing evil things.  However you do it, the only
sane way is to move more functionality to the kernel as compared
to the libkvm way.  That doesn't have to be the formatting code,
and probably shouldn't be.

On Tue, 18 May 1999, Daniel C. Sobral wrote:

> Marc Slemko wrote:
> > 
> > In any case, it makes sense, and is a reasonable alternative.
> > Unfortunately it isn't portable, but that's life.
> 
> And linux /proc is portable? 

I wasn't thinking about that, but obviously no; Linux /proc isn't 
portable.  A lot of the time it isn't even portable across different Linux
kernel versions.
  
However, libkvm accesses are actually somewhat portable to a certain 
extent.



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?Pine.BSF.4.05.9905181025090.24565-100000>