The kernel's namespaces feature is, among other things, a key part of the implementation of containers. Like much in the kernel, though, the namespace API evolved over time; there was no design at the outset. As a result, this API has some rough edges and missing features. Christian Brauner is working to straighten out the namespace situation somewhat with this daunting 72-part patch series that, among other things, adds a new system call to allow user space to query the namespaces present on the system.
内核的命名空间(namespace)机制是容器实现中的关键组成部分之一。然而,和内核中的许多机制一样,namespace API 是随着时间逐渐演化而来,并没有从一开始就经过整体设计。因此,该 API 也留下了一些粗糙之处和缺失的功能。Christian Brauner 正在通过一组庞大的 72 个补丁来改善这一状况,其中包括新增一个让用户空间能够查询架构中存在的命名空间的环境调用。

The original namespace type, now called mount namespaces, was introduced by Al Viro as just "namespaces" in 2001 (they were briefly covered in LWN at the time). UTS namespaces (which provide a different view of the system's host name), process-ID namespaces (managing the visibility of processes), and IPC namespaces (controlling the view of the System V inter-process communication features) followed as part of the 2.6.19 release in 2006. Each namespace type was added when the need arose and somebody was moved to implement it. As the use of namespaces has grown, though, some of the problems in their implementation have become more apparent.
最早的命名空间类型,即现在的挂载命名空间(mount namespace),由 Al Viro 在 2001 年以“namespaces”的名字首次引入(当时 LWN 也做过简要报道)。随后,UTS 命名空间(提供不同的主机名视图)、进程 ID 命名空间(管理进程可见性)以及 IPC 命名空间(控制对 System V 进程间通信特性的访问)在 2006 年随 2.6.19 版本一同加入。每一种新的命名空间类型都是在出现需求且有人愿意实现时被添加的。随着命名空间的使用变得更加普遍,其实现中的一些疑问也变得更加突出。

Reference counts
引用计数

For example, namespaces have complicated lifecycle requirements. A namespace must obviously continue to exist as long as there are any processes that are running within it. For many years, a namespace would automatically be deleted once the last process running within it exited. Over time, the ability to keep an empty namespace around (by opening a file descriptor referencing it or bind-mounting it into the filesystem) was added. Some namespaces (user namespaces, for example)