I'm looking for code reviews for a fix to 6878048, if anyone's willing
to look at it.  It's not a large change, less than 300 lines changed.
The webrev is here:  http://cr.opensolaris.org/~cmynhier/6878048/.

The problem with fuser(1M) is that the kernel function dofusers() does
a walk of the address space (the AVL tree) for every process trying to
match the target vnode.  What I've done is add a hash table to struct
as to keep track of what vnodes are mapped into the AS.

In the best case, almost none of the AS segments will be mmap'd files,
so this will save a significant amount of time for fuser(1M).  In this
case, the additional space requirement is the essentially the size of
an empty hash table per process.  The following is an example of the
performance benefit to be had (where the bulk of the AS segments are
shared memory segments and the time is in milliseconds):

AS segments     current         with fix
0               10.93           5.72
200000          40.08           5.73
400000          69.22           5.74
600000          98.42           5.78
800000          128.05          5.81
1000000         156.22          5.75
1200000         184.31          5.69
1400000         211.76          5.74

In the worst case, all of the AS segments will be mmap'd files, each
segment from a different file.  In this case, there is no performance
benefit, and the additional space requirement is essentially a second
copy of the AVL tree representing the AS.

Chad
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to