Re: [PATCH v2] fix mlocked page counter mistmatch
From: KOSAKI Motohiro
Date: Tue Feb 03 2009 - 21:51:57 EST
> > Could you please teach me why this issue doesn't happend on munlockall()?
> > your scenario seems to don't depend on exit_mmap().
>
>
> Good question.
> It's a different issue.
> It is related to mmap_sem locking issue.
>
> Actually, I am about to make a patch.
> But, I can't understand that Why try_do_mlock_page should downgrade mm_sem ?
> Is it necessary ?
>
> In munlockall path, mmap_sem already is holding in write-mode of mmap_sem.
> so, try_to_mlock_page always fail to downgrade mmap_sem.
> It's why it looks like working well about mlocked counter.
lastest linus tree don't have downgrade mmap_sem.
(recently it was removed)
please see it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/