Re: [rfc][patch] remove racy sync_page?

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

 



On Wed, 31 May 2006, Hugh Dickins wrote:
> 
> Yes, I had noticed yours is a different issue.  I'm saying that if we
> can "fix" set_page_dirty_nolock not to sleep, then your issue is fixed
> (as least as it affects set_page_dirty_lock, which is all your patch
> is dealing with, and we hope all it needs to deal with).  Because your
> issue is with the sync_page in the lock_page of set_page_dirty_nolock,
> and it's that particular lock_page which I'm trying to be rid of.
> 
> I now think it can be done: in cases where TestSetPageLocked finds
> the page already locked, then I believe we can fall back to inode_lock
> to stabilize.  But I do need to consider the possibilities some more.

No, I'm wrong, and have been all along in thinking set_page_dirty_lock
could be done better avoiding the lock_page.  inode_lock gives the hint:
it's not irq safe, nor is mapping->private_lock, and both may be taken
by set_page_dirty.  The lock_page in set_page_dirty_lock was the obvious
reason it couldn't be used at interrupt time, but not the only reason.

So your lock_page_nosync does look the best way forward to me now.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux