Re: [PATCH] mm/hugetlb: per-vma instantiation mutexes

From: David Gibson
Date: Tue Jul 16 2013 - 04:25:12 EST


On Mon, Jul 15, 2013 at 05:12:31PM -0700, Davidlohr Bueso wrote:
> On Mon, 2013-07-15 at 16:08 -0700, Andrew Morton wrote:
> > On Mon, 15 Jul 2013 17:24:32 +1000 David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > > I have previously proposed a correct method of improving scalability,
> > > although it doesn't eliminate the lock. That's to use a set of hashed
> > > mutexes.
> >
> > Yep - hashing the mutexes is an obvious and nicely localized way of
> > improving this. It's a tweak, not a design change.
> >
> > The changelog should describe the choice of the hash key with great
> > precision, please. It's important and is the first thing which
> > reviewers and readers will zoom in on.

Yeah, that is important.

I no longer have much interest in the result of this patch, so I'll
leave it to others to do the forward port and cleanup.

But I will point out the gotcha here is that the hash key needs to be
based on (address_space & file offset) for MAP_SHARED, but (mm &
address) for MAP_PRIVATE.

--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: pgp00000.pgp
Description: PGP signature