lkml.org 
[lkml]   [2015]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Optimising USERNS mapping translation.


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



\
 
 \ /
  Last update: 2015-09-15 16:21    [W:0.042 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site