VM patch 01 to test

Matthew Dillon dillon at apollo.backplane.com
Wed May 12 00:19:04 PDT 2004


    This is primarily for David Rhodus, but anyone else who wants to test
    and/or review this patch, please be my guest!

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

    This patch represents some fairly extensive fixes to the VM system.
    Normally mainline code can assume that if a VM page is not marked PG_BUSY,
    an interrupt (biodone) cannot come along and rip it out from under us.
    Unfortunately from what I can tell, there is actually an interrupt race
    where doing this check without spl protection can result in bad things
    happening:

	m = vm_page_lookup(obj, index);

	[ interrupt can occur here and unbusy and free the page,
	  making the busy check below useless, and then the page that
	  we believe is associated with an object may actually be
	  associated with something else ]

	if (vm_page_sleep_busy(m, ...))
		goto try_again;
	... do stuff to the page ...

    I do not know if these fixes will have any effect on the FS corruption
    issue.  So far nobody has been able to reproduce it and I am beginning
    to think that it may have gotten fixed by one of the commits made in
    the last few days, possibly the one last Thursday to the lockf code that
    fixed a bad 'owner' argument to lf_create_range().  I don't know.
    We'll just have to see.

					-Matt






More information about the Kernel mailing list