summaryrefslogtreecommitdiff
path: root/lib/libpuffs/puffs.h
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2008-01-28 18:35:49 +0000
committerpooka <pooka@NetBSD.org>2008-01-28 18:35:49 +0000
commitd1d05d65b94de0b1c74d001d0f98e05b646d538f (patch)
tree7dd80f18258298311bb60954621b95a3c4a2b673 /lib/libpuffs/puffs.h
parentf3b8aacb17bf459faf28a2822562269980f4be59 (diff)
Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and switched to every time the request was being processed. Now requests borrow the mainloop context and switch only if/when they yield. This takes two context switches away from a file system request bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g. psshfs). The interfaces for manually executing requests changed a bit: puffs_dispatch_create() and puffs_dispatch_exec() must now be used. They are not tested, as nothing in-tree wants them and I doubt anyone else is really interested in them either. Also do some misc code cleanup related to execution contexts. The "work-in-progress checkpoint" committed over a year ago was starting to look slightly weed-infested.
Diffstat (limited to 'lib/libpuffs/puffs.h')
-rw-r--r--lib/libpuffs/puffs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libpuffs/puffs.h b/lib/libpuffs/puffs.h
index 99922f76fbe..53eef7a6a64 100644
--- a/lib/libpuffs/puffs.h
+++ b/lib/libpuffs/puffs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs.h,v 1.104 2008/01/14 13:57:27 pooka Exp $ */
+/* $NetBSD: puffs.h,v 1.105 2008/01/28 18:35:50 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -465,8 +465,11 @@ void puffs_vattr_null(struct vattr *);
void puffs_null_setops(struct puffs_ops *);
-int puffs_dopufbuf(struct puffs_usermount *,
- struct puffs_framebuf *);
+int puffs_dispatch_create(struct puffs_usermount *,
+ struct puffs_framebuf *,
+ struct puffs_cc **);
+int puffs_dispatch_exec(struct puffs_cc *,
+ struct puffs_framebuf **);
/*
* generic/dummy routines applicable for some file systems
@@ -531,7 +534,6 @@ void puffs_cc_continue(struct puffs_cc *);
void puffs_cc_schedule(struct puffs_cc *);
int puffs_cc_getcaller(struct puffs_cc *,pid_t *,lwpid_t *);
struct puffs_cc *puffs_cc_getcc(struct puffs_usermount *);
-void *puffs_docc(void *);
/*
* Flushing / invalidation routines