Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225039 > unrolled thread

Optimising USERNS mapping translation.

Started byAleksa Sarai <cyphar@cyphar.com>
First post2015-09-15 14:40 +0200
Last post2015-09-15 16:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  Optimising USERNS mapping translation. Aleksa Sarai <cyphar@cyphar.com> - 2015-09-15 14:40 +0200
    Re: Optimising USERNS mapping translation. "Eric W. Biederman" <ebiederm@xmission.com> - 2015-09-15 16:10 +0200

#1225039 — Optimising USERNS mapping translation.

FromAleksa Sarai <cyphar@cyphar.com>
Date2015-09-15 14:40 +0200
SubjectOptimising USERNS mapping translation.
Message-ID<q8XGF-4Ub-13@gated-at.bofh.it>
Hi,

I'm wondering if there's a reason that we do a linear search for the
mapping translations between kuid_t and uid_t. Surely something like a
radix trie would (potentially) allow for better storage and lookup? Is
the whole "an extent fits in a cache line" a good enough optimisation
that it would be pointless to use a better structure? Also, is there a
good reason why we have UID_GID_MAP_MAX_EXTENTS = 5 (other than the
one cache line thing)? Surely it's not more efficient to have to
create a bunch of nested namespaces in order to have more than 5
extents?

-- 
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1225141

From"Eric W. Biederman" <ebiederm@xmission.com>
Date2015-09-15 16:10 +0200
Message-ID<q8Z5M-73c-15@gated-at.bofh.it>
In reply to#1225039

On September 15, 2015 7:35:45 AM CDT, Aleksa Sarai <cyphar@cyphar.com> wrote:
>Hi,
>
>I'm wondering if there's a reason that we do a linear search for the
>mapping translations between kuid_t and uid_t. Surely something like a
>radix trie would (potentially) allow for better storage and lookup? Is
>the whole "an extent fits in a cache line" a good enough optimisation
>that it would be pointless to use a better structure? Also, is there a
>good reason why we have UID_GID_MAP_MAX_EXTENTS = 5 (other than the
>one cache line thing)? Surely it's not more efficient to have to
>create a bunch of nested namespaces in order to have more than 5
>extents?

Is this a homework question?  It sounds like one.

If you need more than about two extents you are managing your uids very badly.

As for the nested namespaces and 5 extents limit.  I will let you read the code and think about that one.

Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web