|
|
Subscribe / Log in / New account

On drugs, or confused reporting?

On drugs, or confused reporting?

Posted Mar 27, 2017 5:09 UTC (Mon) by ncm (guest, #165)
Parent article: Sharing pages between mappings

A hundred processes routinely share each of hundreds of pages of a file, and hundreds of the next file, mapped at random starting addresses. That is what .so files are for.

The reporting seems to refer to something else entirely, but it is hard to see any difference. What am I missing? Is everyone in kernel-land talking about the same thing, or are they as confused as we are?


to post comments

On drugs, or confused reporting?

Posted Mar 27, 2017 5:29 UTC (Mon) by dgc (subscriber, #6611) [Link] (2 responses)

Containers often don't share library files, so don't share file data mappings in the traditional way. e.g. two containers using snapshot-based filesystem images. The read-only files in each container image may share the same disk blocks, but to the user/VFS/mm subsytems they are different files because they live in different paths, in different mount namespaces accessed through different superblocks. Only the layer that is aware of the snapshot knows that the data extents the two inodes point to are actually the same blocks on disk and so share data....

Same thing goes for sparse directory tree clones generated with reflink - the VFS/OS thinks they are separate files and only the underlying filesystem knows that those cloned files share their data blocks with the other files.....

On drugs, or confused reporting?

Posted Mar 27, 2017 16:33 UTC (Mon) by ms-tg (subscriber, #89231) [Link] (1 responses)

Thanks for an informative and concise answer

On drugs, or confused reporting?

Posted Apr 3, 2017 3:49 UTC (Mon) by kingdon (guest, #4526) [Link]

Here's some of the background on union mounts: https://lwn.net/Articles/396020/

Docker (and similar systems) use a union mount so they don't need every container to have its own copy of all the files in the operating system.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds