<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mount on *scratch*</title>
    <link>https://www.scrivano.org/tags/mount/</link>
    <description>Recent content in Mount on *scratch*</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 06 Jun 2026 10:03:54 +0000</lastBuildDate>
    <atom:link href="https://www.scrivano.org/tags/mount/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Avoid a memory page allocation on mount(2)</title>
      <link>https://www.scrivano.org/2019/12/27/avoid-a-memory-page-allocation-on-mount/</link>
      <pubDate>Fri, 27 Dec 2019 16:16:33 +0000</pubDate>
      <guid>https://www.scrivano.org/2019/12/27/avoid-a-memory-page-allocation-on-mount/</guid>
      <description>&lt;p&gt;While working on crun, I got surprised by how much time the kernel spent in the &lt;code&gt;copy_mount_options&lt;/code&gt; function. A container runtime issues a large number of &lt;code&gt;mount(2)&lt;/code&gt; syscalls during startup — bind mounts, proc, sysfs, devtmpfs, and more — many of them with no extra options to pass. It turned out that passing an empty string instead of &lt;code&gt;NULL&lt;/code&gt; for the data argument caused the kernel to allocate a full memory page and attempt a copy from user space on every one of those calls, adding measurable overhead.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
