Re: VM: Fix nasty and subtle race in shared mmap'ed page writeback

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

 



On Fri, 5 Jan 2007, Linus Torvalds wrote:

> However, a lot of the code isn't really amenable to it as it stands now. 
> We very much tend to call it in critical sections, and you have to move 
> them all out of the locks they are now.

It looks as if most code handling the dirty bits already uses the page 
lock?

> "Artistic". Good word. That said, most of the code in there needs its own 
> locks for other reasons (ie the reason __set_page_dirty_nobuffers() ends 
> up taking the tree-lock is because of the radix tree bits, which can NOT 
> be protected by per-page locks _anyway_).

According to the comments: Most callers of __set_page_dirty_nobuffers hold 
the page lock. The only exception seems to be zap_pte_range where we 
transfer the dirty information from the pte to the page. This is now much 
rarer since the dirty mmap tracking patches make the fault handler deal 
with it.

Still, the page dirtying in zap_pte_range remains a potential trouble spot 
for the remaining cases in which we need to dirty pages there since it is 
not rate limited. There is a potential cause for creating deadlocks 
because too many pages were dirtied and the file system cannot allocate 
enough memory for writeout.

-
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