diff options
| author | 2009-08-20 15:04:24 +0000 | |
|---|---|---|
| committer | 2009-08-20 15:04:24 +0000 | |
| commit | 0324048376a3be805af0956efb4d721b44c78185 (patch) | |
| tree | 3d4ec0bec3ce5c1799b67ac433e140cd218de3ae /sys/nfs/nfsnode.h | |
| parent | fix indentation (diff) | |
| download | wireguard-openbsd-0324048376a3be805af0956efb4d721b44c78185.tar.xz wireguard-openbsd-0324048376a3be805af0956efb4d721b44c78185.zip | |
Rework the way we do async I/O in nfs. Introduce separate buf queues for
each mount, and when work is "found", peg an aiod to that mount todo the
I/O. Make nfs_asyncio() a bit smarter when deciding when to do asyncio
and when to force it sync, this is done by keeping the aiod's one two lists,
an "idle" and an "all" list, so asyncio is only done when there are aiods
hanging around todo it for us or are already pegged to the mount.
Idea liked by at least beck@ (and I think art@).
Extensive testing done by myself and jasper and a few others on various
arch's.
Ideas/Code from Net/Free.
OK blambert@.
Diffstat (limited to 'sys/nfs/nfsnode.h')
| -rw-r--r-- | sys/nfs/nfsnode.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h index ce8edebb97c..6f95d808bb0 100644 --- a/sys/nfs/nfsnode.h +++ b/sys/nfs/nfsnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsnode.h,v 1.34 2009/08/10 10:59:12 thib Exp $ */ +/* $OpenBSD: nfsnode.h,v 1.35 2009/08/20 15:04:24 thib Exp $ */ /* $NetBSD: nfsnode.h,v 1.16 1996/02/18 11:54:04 fvdl Exp $ */ /* @@ -137,10 +137,20 @@ struct nfsnode { #define VTONFS(vp) ((struct nfsnode *)(vp)->v_data) #define NFSTOV(np) ((np)->n_vnode) -/* - * Queue head for nfsiod's - */ -extern TAILQ_HEAD(nfs_bufqhead, buf) nfs_bufq; -extern uint32_t nfs_bufqlen, nfs_bufqmax; +/* nfs aiod datas. */ +struct nfs_aiod { + LIST_ENTRY(nfs_aiod) nad_all; + LIST_ENTRY(nfs_aiod) nad_idle; + struct nfsmount *nad_mnt; + int nad_exiting; +}; + +LIST_HEAD(nfs_aiodhead, nfs_aiod); + +extern struct mutex nfs_aiodl_mtx; +extern struct nfs_aiodhead nfs_aiods_all; +extern struct nfs_aiodhead nfs_aiods_idle; +extern int nfs_numaiods; +extern int nfs_aiodbufqmax; #endif /* _NFS_NFSNODE_H_ */ |
