Re: [patch] mlock-as-nonroot revisted

From: Andrea Arcangeli
Date: Tue Aug 03 2004 - 17:44:40 EST


On Tue, Aug 03, 2004 at 03:33:35PM -0700, Chris Wright wrote:
> I just mean in general the only time it's valid to drop the binding
> (which includes dropping refcount on the user struct) should be when
> the object is destroyed.

yep, agreed.

> > Maybe it's just that those are incremental patches and I'm missing the
> > other part of the patch, but reading those patches I can't see where the
> > user_subtract_mlock happens when I truncate an hugetlbfs file (or delete
> > it or whatever). Sure it can't be munlock releasing/_updating_ the user-struct
> > accounting for fs persistent storage. But if other code takes care of it
> > then maybe you want to delete the user_subtract_mlock function and use
> > the other piece that already existed for truncate.
>
> Heh, yeah in a place like hugetlb_put_quota?

yep. that's the kind of function I was looking for to update/release the
accounting, but it's not there, and sure it wasn't there in the previous
patch either.
-
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/