tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [simonb-wapbl] src/sys/kern



On Mon, Jul 28, 2008 at 08:12:34PM -0700, Jason Thorpe wrote:
> [follow-ups to tech-kern; BCC'd source-changes on this message.]
> 
> On Jul 28, 2008, at 7:02 PM, Greg Oster wrote:
> 
> >I'm still not sure exactly what's going on, but here are some notes
> >on what I believe to be happening:
> >
> >1) General writes are done as RW_READERs.
> >
> >2) Log flushing (and fyncs) are done as RW_WRITERs.
> >
> >3) When RW_WRITER finishes, all RW_READERS are signaled to "go", so
> >there is a 'thundering herd' after a log flush.
> >
> >4) With a number of meta-data-generating processes (e.g. 10x tar
> >-xf's) a huge amount of meta-data can be generated in a short amount
> >of time.
> >
> >5) By adding instrumentation to
> > src/sys/miscfs/syncfs/sync_subr.c:vn_syncer_add_to_worklist()
> >what I've seen is that some 85000+ items get queued in under 10
> >seconds, such that by the time the loop in sched_sync() gets around
> >to handling the first major onslaught, there are now some 15000-20000
> >items waiting on the next queue.  And it just gets worse after that.
> >
> >6) Each of these queue items needs to be handled with VOP_FSYNC().
> >
> >7) I believe that's going to end up calling ffs_fsync(), which is
> >going to call wapbl_flush(..,0).
[snip]

Would it help if we modify sched_sync() to handle wapbl more like it handles
softdep:

@@ -220,9 +225,9 @@ sched_sync(void *v)
                                mutex_exit(&syncer_data_lock);
                                if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT |
                                    LK_INTERLOCK) == 0) {
                                        (void) VOP_FSYNC(vp, curlwp->l_cred,
-                                           FSYNC_LAZY, 0, 0);
+                                           FSYNC_LAZY | FSYNC_NOLOG, 0, 0);
                                        vput(vp);
                                }
                                mutex_enter(&syncer_data_lock);
                        }
@@ -245,8 +250,11 @@ sched_sync(void *v)
                 * Do soft update processing.
                 */
                if (bioopsp != NULL)
                        (*bioopsp->io_sync)(NULL);
+#ifdef WAPBL
+               wapbl_flush(mp->mnt_wapbl, 0);
+#endif
 
                mutex_exit(&syncer_mutex);
 
                mutex_enter(&syncer_data_lock);
-- 
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)


Home | Main Index | Thread Index | Old Index