diff options
author | mckusick <mckusick@FreeBSD.org> | 2014-08-18 22:53:48 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2014-08-18 22:53:48 +0000 |
commit | 4791bac9b41a259cdb9821e381df8837926220e2 (patch) | |
tree | 3f03c7c27ae5b52fc385dea819a103c4b5167b36 /sys/kern | |
parent | 5482ed49237e17f95e34a2e4479f4b875414661d (diff) | |
download | FreeBSD-src-4791bac9b41a259cdb9821e381df8837926220e2.zip FreeBSD-src-4791bac9b41a259cdb9821e381df8837926220e2.tar.gz |
MFC of 269533 (by mckusick):
Add support for multi-threading of soft updates.
Replace a single soft updates thread with a thread per FFS-filesystem
mount point. The threads are associated with the bufdaemon process.
Reviewed by: kib
Tested by: Peter Holm and Scott Long
MFC after: 2 weeks
Sponsored by: Netflix
MFC of 269853 (by kib):
Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list. Use softdep global lock consistently to guarantee the list
structure now.
Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory. Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.
Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4ab4866..1cbc891 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -98,7 +98,8 @@ struct buf_ops buf_ops_bio = { struct buf *buf; /* buffer header pool */ caddr_t unmapped_buf; -static struct proc *bufdaemonproc; +/* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */ +struct proc *bufdaemonproc; static int inmem(struct vnode *vp, daddr_t blkno); static void vm_hold_free_pages(struct buf *bp, int newbsize); |