[724] in arla-drinkers

home help back first fref pref prev next nref lref last post

Re: bsd-xfs, signaling to break a wait

daemon@ATHENA.MIT.EDU (Robert Watson)
Tue Mar 30 12:40:13 1999

From owner-arla-drinkers@stacken.kth.se Tue Mar 30 17:40:11 1999
Return-Path: <owner-arla-drinkers@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 4293 invoked from network); 30 Mar 1999 17:40:08 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
  by bloom-picayune.mit.edu with SMTP; 30 Mar 1999 17:40:08 -0000
Received: (from majordom@localhost)
	by sundance.stacken.kth.se (8.8.8/8.8.8) id TAA28538
	for arla-drinkers-list; Tue, 30 Mar 1999 19:32:43 +0200 (MET DST)
Received: from fledge.watson.org (root@FLEDGE.RES.CMU.EDU [128.2.93.229])
	by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id TAA28534;
	Tue, 30 Mar 1999 19:32:38 +0200 (MET DST)
Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3])
	by fledge.watson.org (8.8.8/8.8.8) with SMTP id MAA23466;
	Tue, 30 Mar 1999 12:32:33 -0500 (EST)
	(envelope-from robert@cyrus.watson.org)
Date: Tue, 30 Mar 1999 12:32:33 -0500 (EST)
From: Robert Watson <robert@cyrus.watson.org>
X-Sender: robert@fledge.watson.org
Reply-To: Robert Watson <robert@cyrus.watson.org>
To: Love <lha@stacken.kth.se>
cc: arla-drinkers@stacken.kth.se
Subject: Re: bsd-xfs, signaling to break a wait
In-Reply-To: <amaewwvk70.fsf@robert.e.kth.se>
Message-ID: <Pine.BSF.3.96.990330122849.18736F-100000@fledge.watson.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-arla-drinkers@stacken.kth.se
Precedence: bulk

On 29 Mar 1999, Love wrote:

> Robert Watson <robert@cyrus.watson.org> writes:
> 
> > Arla Folk,
> > 
> > I've been playing with XFS some over the last week or so.  I ran into the
> > following behavior:
> 
> I assume your're using the BSD xfs.

Yup -- BSD xfs on 4.0-CURRENT of FreeBSD

> I see what you are trying to say, but since all (t)sleepings are done
> by each separate process and the sleepings are independent from each other.
> (see xfs_message.c:xfs_message_rpc()).

I observed this behavior specifically on the xfs_message_getroot call--for
a first pass, I just wrote a small program that listened on /dev/xfs0.  It
would read messages from it, but never respond.  I observed that when this
was the case, the interrupt behavior I described occurred.  I'll try it on
other calls once I get a few more of them working.

> When I tried it on my fbsd2.2.x host I hade to press C-c twice for some odd
> reson I don't have time to figure out now. But it worked independely in
> what order I killed them.
> 
> Would help if you could give us a testcase that (didn't) worked.
> 
> We do ignore SIGIO during the rpc, but that is only because emacs
> tab-completion breaks if we don't.

I notice that the rpc to userland is frequently used, but there appears to
be matching userland code for an rpc to the kernel that is unused.  Is
that observation correct, or is it in use?

Also, the BSD xfs kernel module appears to implement blocking only on
select(), not on read() when the file descriptor is set as blocking.  I
was wondering what the reasoning was there, or if it was just that you
never do that so didn't implement it? :-)  A

while (1) {
	i = read(kernelfd, buf, buflen);
	printf("%d\n", i);
}

returns a continuous stream of 0's as opposed to blocking, leading to some
surprise on my first pass at using it :-).

  Robert N Watson 

robert@fledge.watson.org              http://www.watson.org/~robert/
PGP key fingerprint: 03 01 DD 8E 15 67 48 73  25 6D 10 FC EC 68 C1 1C

Carnegie Mellon University            http://www.cmu.edu/
TIS Labs at Network Associates, Inc.  http://www.tis.com/
Safeport Network Services             http://www.safeport.com/


home help back first fref pref prev next nref lref last post