Hey,
I'd like to commit this patch in a couple of days if nobody objects. I
think this fixes the "audio stutters" on machines with a lot of memory.
cheers
simon
Index: kern/vfs_mount.c
===================================================================
RCS file: /home/dcvs/src/sys/kern/vfs_mount.c,v
retrieving revision 1.30
diff -u -p -r1.30 vfs_mount.c
--- kern/vfs_mount.c 5 Jan 2008 14:02:38 -0000 1.30
+++ kern/vfs_mount.c 5 Feb 2008 01:18:21 -0000
@@ -906,6 +906,7 @@ vmntvnodescan(
struct vnode *vp;
int r = 0;
int maxcount = 1000000;
+ int count = 0;
lwkt_gettoken(&ilock, &mntvnode_token);
@@ -981,12 +982,24 @@ vmntvnodescan(
break;
}
+next:
+ /*
+ * Yield after some processing. Depending on the number
+ * of vnodes, we might wind up running for a long time.
+ * Because threads are not preemptable, time critical
+ * userland processes might starve. Give them a chance
+ * now and then.
+ */
+ if (++count == 10000) {
+ lwkt_yield();
+ count = 0;
+ }
+
/*
* Iterate. If the vnode was ripped out from under us
* info.vp will already point to the next vnode, otherwise
* we have to obtain the next valid vnode ourselves.
*/
-next:
if (info.vp == vp)
info.vp = TAILQ_NEXT(vp, v_nmntvnodes);
}
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
| Alan Cox | [PATCH 00/80] TTY updates for 2.6.28 |
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Linux 2.6.27 |
| Linus Torvalds | Linux 2.6.27-rc8 |
git: | |
| Daniel Berlin | Re: Git and GCC |
| David Kastrup | Empty directories... |
| Denis Bueno | Recovering from repository corruption |
| Linus Torvalds | Re: "failed to read delta base object at..." |
| Hugh Dickins | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Simon Horman | Re: Possible regression in HTB |
| Paul Moore | [PATCH v7 00/17] Labeled networking patches for 2.6.28 |
| Wenji Wu | about Linux adaptivly adjusting ssthresh |
| Linux Kernel Mailing List | i.MX3: make SoC devices globally available |
| Linux Kernel Mailing List | ARM: DaVinci: i2c setup |
| Linux Kernel Mailing List | MXC: Remove WD IRQ priority setting |
| Linux Kernel Mailing List | [MACVLAN]: Update Kconfig to refer to iproute |
| sata/ide timeout errors on asus server-mb | 1 hour ago | Linux kernel |
| Shared swap partition | 2 hours ago | Linux general |
| usb mic not detected | 6 hours ago | Applications and Utilities |
| Problem in Inserting a module | 7 hours ago | Linux kernel |
| Treason Uncloaked | 12 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
| Root password | 3 days ago | Linux general |
