Date: Fri, 09 Mar 2007 12:37:49 -0600 From: Alan Cox <alc@cs.rice.edu> To: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Cc: alc@freebsd.org, hackers@freebsd.org Subject: Re: possibly missed wakeup in swap_pager_getpages() Message-ID: <45F1A97D.7090608@cs.rice.edu> In-Reply-To: <20070309132851.GA52655@stud.fit.vutbr.cz> References: <20070309132851.GA52655@stud.fit.vutbr.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Divacky Roman wrote: >hi > > > [snip] >is my analysis correct? if so, can the race be mitigated by moving the flag setting (hence >also the locking) after the msleep()? > > > No. When the wakeup is performed, the VPO_SWAPINPROG flag is also cleared. Both operations occur in the I/O completion handler with the object locked. Thus, if the I/O completion handler runs first, the msleep on the page within the while loop will not occur because the page's VPO_SWAPINPROG flag is already cleared. Regards, Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45F1A97D.7090608>