Re: [PATCH] hugetlb: fix lockdep splat caused by pmd sharing

From: Michal Hocko
Date: Tue Jul 30 2013 - 11:23:49 EST


On Tue 30-07-13 16:58:34, Peter Zijlstra wrote:
> On Tue, Jul 30, 2013 at 04:46:00PM +0200, Michal Hocko wrote:
[...]
> > +/*
> > + * Now, reclaim path never holds hugetlbfs_inode->i_mmap_mutex while it could
> > + * hold normal inode->i_mmap_mutex so this annotation avoids a lockdep splat.
>
> How about something like:
>
> /*
> * Hugetlbfs is not reclaimable; therefore its i_mmap_mutex will never
> * be taken from reclaim -- unlike regular filesystems. This needs an
> * annotation because huge_pmd_share() does an allocation under
> * i_mmap_mutex.
> */
>
> It clarifies the exact conditions and makes easier to verify the
> validity of the annotation.

Yes, looks much better. Thanks!
---