RE: [PATCH] mm: fail prefaulting if page table allocation fails

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

 



> > In filemap_map_pages()
> > 	CPU0					CPU1
> > 	trylock_page at offset_A		trylock_page at offset_A
> > 						goto offset_A+1
> > 	if (!fe->pte) {
> > 		alloc pte
> > 		map pte
> > 		lock pte
> > 	}
> > 	handle offset_A with ptl held		handle offset_A+1 without acquiring ptl
> 
> I still don't see where's the problem.
> 
> On the seond iteration (for offset_A+1), CPU1 would go into
> alloc_set_pte() and as its fe->pte is NULL pte_alloc_one_map() would map
> and lock the pte table allocated by CPU0.
> 
Ah, you are right. I missed the 2nd fe!

thanks
Hillf

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]