Re: [PATCH -V2] hugetlbfs: Drop taking inode i_mutex lock from hugetlbfs_read

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

 



On Thu, Mar 01, 2012 at 02:10:07PM -0800, Andrew Morton wrote:
 
 > > AFAIU i_mutex lock got added to  hugetlbfs_read as per
 > > http://lkml.indiana.edu/hypermail/linux/kernel/0707.2/3066.html
 > > to take care of the race between truncate and read. This patch fix
 > > this by looking at page->mapping under page_lock (find_lock_page())
 > > to ensure; the inode didn't get truncated in the range during a
 > > parallel read.
 > > 
 > > Ideally we can extend the patch to make sure we don't increase i_size
 > > in mmap. But that will break userspace, because application will now
 > > have to use truncate(2) to increase i_size in hugetlbfs.
 > 
 > Looks OK to me.
 > 
 > Given that the bug has been there for four years, I'm assuming that
 > we'll be OK merging this fix into 3.4.  Or we could merge it into 3.4
 > and tag it for backporting into earlier kernels - it depends on whether
 > people are hurting from it, which I don't know?

My testing hits this every day. It's not a real problem, but it's annoying
to see the lockdep spew constantly.  We've had a couple Fedora users
report it too in regular day-to-day use as opposed to the hostile
workloads I use to provoke it.

FWIW, I'll probably throw it in the Fedora kernels, so if it ends up
in stable, it'll be one less patch to carry.

	Dave

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]