newtoken01.patch - New Token code patch ready for testing

Matthew Dillon dillon at apollo.backplane.com
Mon Feb 23 00:47:05 PST 2004


    All right, here's the first iteration of the new token code patch
    for testing.

	fetch http://apollo.backplane.com/DFlyMisc/newtoken01.patch 

    This patch:

	* Implements the new token code concept, including augmenting 
	  a number of vnode and VOP ops to pass the auxillary lock
	  reference structure around.

	* Cleans up and enables lwkt_rwlock's

	* Starts the AP's a little earlier on SMP systems and moves
	  initializtion ops that require tokens which were previously
	  run from the AP's idlethread.  They are now run by the BP
	  after the AP's have finished initializing.

	* Changes vnode->v_interlock from an embedded structure to a
	  pointer to a pool of mutexes.  This way the interlock for a
	  vp is always a valid token no matter what happens to the vp.

	* Rewrites the vnode mountlist scanning code in all filesystems,
	  removing all race conditions that previously existed.

    I've done moderate testing on UP and SMP boxes.  It needs a whole
    lot more testing.  In particular, the other non-UFS filesystems need
    to be tested.  Don't bother with LINT... I'm sure it gets most of the
    way through LINT but that wasn't my goal for this first patch set.

    I'm certain there are still bugs, but I think I've got it 95% of the
    way there.

    This current iteration spins on the tokens instead of yields.  A number
    of subsystems, most notably softupdates, can't handle yields.  But the
    patch set is already very large so my intention is to stabilize what I
    have now, commit it in a week or so, then do another iteration to
    convert the spinning into yields and to fix the subsystems that can't
    currently handle yields.

    Tomorrow I will continue testing with various devices.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list