[OpenAFS-devel] Solaris afs.rc file damage (fwd)

Dean Anderson dean@av8.com
Tue, 17 Apr 2007 13:26:47 -0400 (EDT)


---------- Forwarded message ----------
Date: Sun, 15 Apr 2007 15:39:52 -0400 (EDT)
From: Dean Anderson <dean@av8.com>
To: Garrett Wollman <wollman@csail.mit.edu>
Subject: Re: [OpenAFS-devel] Solaris afs.rc file damage

You're right; And I should get out more ;-)  

But looking at solaris source, it seems like there should be little
contention on this lock, and it shouldn't be held long.  In solaris
ioctl, the lock on the user file list is only held by getf while it gets
the file pointer and updates the reference count.  Only one lock is
taken on solaris, unless there is one in the VOPSTATS_UPDATE macro.  I
also didn't see if it was a spin lock---a grep didn't quickly reveal a
mutex_init for the solaris per-user uf_lock in the uts/common/*/*. But
that may not be important.

I concede that the syscall approach may be a little bit faster, having
no lock at all.  At least, its a good reason to assert there is a
difference between syscall and ioctl. However, the issue may be moot if
systems drop dynamic syscalls.

Someone said that linux now uses a pseudo driver. Perhaps we can measure
the performance difference on linux between the syscall and the driver,
and that may give a clue to the performance on other systems.

		--Dean



On Fri, 13 Apr 2007, Garrett Wollman wrote:

> <<On Fri, 13 Apr 2007 12:38:44 -0400 (EDT), Dean Anderson <dean@av8.com> said:
> 
> > I'm not aware of any locks taken that specific to the ioctl call that
> > would be taken on every ioctl call. Whether locks are necessary or taken
> > usually depends on the driver. We'll be providing the driver code...
> 
> You need to get out more.
> 
> At a minimum, a modern system will need some sort of lock over the
> process-file-descriptor structure in order to translate the fd
> number provided into an internal descriptor of some sort.  On my handy
> FreeBSD system, a second lock is required to translate the vnode
> (referenced by the file descriptor) into a device operations
> structure.  Neither of these are required for a system call.  (Of
> course, FreeBSD reserves system call entries for afs_syscall() and
> pioctl() so the problem your proposal looks to solve doesn't exist
> there.)
> 
> -GAWollman
> 
> 
> 

-- 
Av8 Internet   Prepared to pay a premium for better service?
www.av8.net         faster, more reliable, better service
617 344 9000