LWN: Comments on "The folio pull-request pushback" https://lwn.net/Articles/868598/ This is a special feed containing comments posted to the individual LWN article titled "The folio pull-request pushback". en-us Sat, 01 Nov 2025 11:23:46 +0000 Sat, 01 Nov 2025 11:23:46 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net The folio pull-request pushback https://lwn.net/Articles/872406/ https://lwn.net/Articles/872406/ scientes <div class="FormattedComment"> Maybe the TLB could be put *after* the cache, by using globally addressable memory, and having ranged memory permissions for such large slabs of memory, instead of paged memory be the only option (you can still defrag by putting a TLB and MMU *behind* the cache, which like an IOMMU has minimal overhead). We have 64-bit of address space now—there is no shortage of address space.<br> </div> Sun, 10 Oct 2021 09:00:48 +0000 The folio pull-request pushback https://lwn.net/Articles/871099/ https://lwn.net/Articles/871099/ immibis <div class="FormattedComment"> Okay, what if I have 32GB of RAM and I want to grep a bigger project that was using 30GB before? You can&#x27;t really justify a 300% overhead(!!!) by saying it&#x27;s okay on one particular workload.<br> </div> Tue, 28 Sep 2021 16:13:54 +0000 The folio pull-request pushback https://lwn.net/Articles/870094/ https://lwn.net/Articles/870094/ SomeOtherGuy <div class="FormattedComment"> There&#x27;s a lot of focus on the name here, this reference is often overused but I think you guys are having a bit of a &quot;bikeshed&quot; moment - the name is the most trivial part of this. <br> <p> This is quite a common situation, so much so the object-orientated analogy is common (but slightly altered)<br> <p> We have a Bird class, later Birds gain the ability to fly, our Penguin subclass can&#x27;t fly - we have to handle that. <br> <p> At some point the sane action is to create a FlyingBird subclass and stick your flying birds there and leave Penguin under the now-implied-flightless Bird base class, or (which you can do here as structs don&#x27;t inherit) have a FlightlessBird name we put Penguins under.<br> <p> You have a third option: both, you now have FlightlessBird and FlyingBird and the implied-property-of-Bird (whichever it was, flightless or not) is now attached to the name. <br> <p> That&#x27;s it, those are your options up to name isomorphism - bickering about FlyingBird vs flightful_bird doesn&#x27;t change what&#x27;s going on.<br> </div> Thu, 23 Sep 2021 08:22:53 +0000 The folio pull-request pushback https://lwn.net/Articles/869824/ https://lwn.net/Articles/869824/ jwarnica <div class="FormattedComment"> Kernel will cache everything, but discard LRU when needed.<br> <p> A config file read, parsed, stored in working memory, and closed, it being cached it&#x27;s a &quot;waste&quot; of cache memory either way.<br> <p> It&#x27;s only painful if caching that new file displaces an older cached file which will be read again in some human meaningful time.<br> </div> Mon, 20 Sep 2021 00:37:50 +0000 The folio pull-request pushback https://lwn.net/Articles/869472/ https://lwn.net/Articles/869472/ arnd <div class="FormattedComment"> I did some measurements a while ago, using linux-5.4 at the time to see the effect of additional<br> memory usage of the different page sizes. I tried running linux-5.14-rc1+folio as well, and<br> put the results in a graph:<br> <p> <a href="https://docs.google.com/spreadsheets/d/1Y-eeXEHr8Tud2ul4iApn6hLEQoMsl3Bsud-vlW3V2t8/edit?usp=sharing">https://docs.google.com/spreadsheets/d/1Y-eeXEHr8Tud2ul4i...</a><br> <p> I did this on a 16-Core Arm machine that supports 4KB, 16KB and 64KB pages, giving 4GB to a virtual<br> machine, and pinning down part of that memory before building a fixed kernel source tree.<br> <p> Since the compiler uses mostly contiguous anonymous memory, the effect of the page size is not as strong as when considering only the page cache that wastes more memory, but you can definitely see that the 64KB kernel needs around double the RAM compared to a 4KB kernel, and it also suffers more when it does start paging. The 4KB kernel seems to work much better when it&#x27;s already deep into swap, while the 64KB kernel gets unusable pretty much instantly as soon as it runs out of free pages.<br> <p> The 16KB page kernel works better than expected -- not only is it almost as fast as the 64KB version when it has enough RAM available, it also copes with out-of-memory conditions aslmost as well as the 4KB version.<br> <p> The folio-enabled kernel also seems to have a problem with running into swap, but I don&#x27;t know if that&#x27;s a result of something different in the folio patches, or a difference between the old 5.4 kernel and the new 5.14-rc1 version. If I find the time to run another test with 5.14-rc1 without the folio patches, I&#x27;ll add the data to the graph.<br> </div> Fri, 17 Sep 2021 09:31:04 +0000 The folio pull-request pushback https://lwn.net/Articles/869316/ https://lwn.net/Articles/869316/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; Yes, folios may be imperfect and not-abstracted enough, but they *are* a step in the right direction and further improvements can be built built on top of them.</font><br> <font class="QuotedText">&gt; I don&#x27;t see an argument that folios block any of the other work that somebody else might be doing (but, or so it seems, currently isn&#x27;t).</font><br> <p> This is the key point IMHO. If some short-term code change makes more difficult some hypothetical, longer term plans, then the long term vision should be detailed enough to at least demonstrate how it conflicts with the short term change. Otherwise it&#x27;s far beyond vaporware.<br> <p> <p> <p> </div> Wed, 15 Sep 2021 18:32:36 +0000 The folio pull-request pushback https://lwn.net/Articles/869173/ https://lwn.net/Articles/869173/ cpitrat <div class="FormattedComment"> A computer is done for general purpose. Dismissing any use case that needs opening a large number of small file is a weird way to answer the concern. The kernel files are representative of what most devs would work with: small files. Is it representative of all users and all workloads? Certainly not but it represents an existing scenario and quadrupling the memory consumed is problematic.<br> <p> Many files smaller than 64KiB ar me opened by the system at some point and stored in cache (all configuration files, log files ...). Only in /etc I have 2500 files smaller than 8KiB and I&#x27;m pretty sure most of them have been opened at one point and cached by the kernel. Same for files under $HOME/.config and other dotted directories.<br> </div> Tue, 14 Sep 2021 11:05:26 +0000 The folio pull-request pushback https://lwn.net/Articles/869157/ https://lwn.net/Articles/869157/ Wol <div class="FormattedComment"> <font class="QuotedText">&gt; How many small files are actually stored in cache? Conf files are generally read and abandoned. If it is a gain, then major server operators would be quick to code systems to store data in larger data structures; even now, tossing a bunch of small files into a database could save space and time.</font><br> <p> Hasn&#x27;t the kernel just added a &quot;read and abandon&quot; facility? User space may read and abandon, but the kernel caches EVERYTHING by default aiui. The cost of that is measurable, and big.<br> <p> Cheers,<br> Wol<br> </div> Tue, 14 Sep 2021 05:28:22 +0000 The folio pull-request pushback https://lwn.net/Articles/869143/ https://lwn.net/Articles/869143/ dvdeug <div class="FormattedComment"> How many small files are actually stored in cache? Conf files are generally read and abandoned. If it is a gain, then major server operators would be quick to code systems to store data in larger data structures; even now, tossing a bunch of small files into a database could save space and time.<br> <p> I&#x27;m sure increasing the page size to 64KB would be an improvement in some cases, and hurt others. I just think that storing every single kernel file in cache is a bad comparison. (If nothing else, if grepping the entire kernel is something you&#x27;re actually doing frequently, you&#x27;re doing it wrong; efficient searching via precomputed indexes has been around for 50 years, or if we ignore the electronic computer part, for centuries.) There should be some sort of measurement on real situations.<br> </div> Mon, 13 Sep 2021 23:32:51 +0000 The folio pull-request pushback https://lwn.net/Articles/869141/ https://lwn.net/Articles/869141/ dvdeug <div class="FormattedComment"> If your system does not have a separate header cache, there&#x27;s a problem you might like to fix. When opening the mailbox up cold, you&#x27;re going to be paying that cost anyway. Once you&#x27;ve opened up the mailbox, your mail program certainly can and should store the headers in memory (much more reliable than the kernel cache, and maybe even noticeably faster), and possibly should store the messages in memory, to avoid all this cache mess to begin with. (It&#x27;ll cost less memory than storing them in kernel cache, even with 4KB pages.)<br> <p> <font class="QuotedText">&gt; it&#x27;s no less handwavy than the original assertion that you&#x27;ll surely have 5 GB of free RAM.</font><br> <p> Kernel programmers are well-paid professionals. They don&#x27;t have used Dell Optiplexes as their main PC; their programming boxes are almost certainly high-end hardware. $1000 will buy you a computer with 16GB. There&#x27;s a lot of websites that tell you 8 GB is fine for programming, but generally kernel programmers aren&#x27;t going to need or want to skimp out on their hardware. <br> </div> Mon, 13 Sep 2021 22:37:06 +0000 The folio pull-request pushback https://lwn.net/Articles/869127/ https://lwn.net/Articles/869127/ Paf <div class="FormattedComment"> Ok, but think about all kinds of server use cases with many small files. They don’t necessarily have “spare” RAM laying around. They’re specced to the system. This is a truly huge overhead in a lot of real world cases which would cost a lot of real world money.<br> </div> Mon, 13 Sep 2021 21:50:13 +0000 The folio pull-request pushback https://lwn.net/Articles/869044/ https://lwn.net/Articles/869044/ Sesse <div class="FormattedComment"> Opening old emails? Remember, I&#x27;m talking about opening a _mailbox_, reading every single email to check its headers. (No, not all systems can maintain a separate header cache.)<br> <p> Also, please note that when you dismiss others&#x27; (real!) use cases as “handwaving based off contrived situations”, it does not come across as the most friendly way to make your case. At the very least, it&#x27;s no less handwavy than the original assertion that you&#x27;ll surely have 5 GB of free RAM.<br> </div> Mon, 13 Sep 2021 09:32:47 +0000 The folio pull-request pushback https://lwn.net/Articles/869017/ https://lwn.net/Articles/869017/ dvdeug <div class="FormattedComment"> <font class="QuotedText">&gt; What if I want to read my email, which is on Maildir, and would like the mailbox to be in cache so that I can open it quickly? Is it reasonable to waste gigabytes of RAM (which I would prefer to use on opening a few extra tabs in my browser…) on 64 kB pages for each email?</font><br> <p> Catting a small, cold file to Konsole with time -v yielded &quot;Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01&quot;. Dumping a 60k cold file to Konsole with time -v yielded &quot;Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.26&quot;. In both cases, this was off hard drive. I&#x27;m going to say that demanding your entire mailbox with thousands of emails to be in cache so you can save hundredths of a second in opening old emails is unreasonable, and demanding the entire kernel for everyone to be optimized for that occurrence is even more unreasonable.<br> <p> What if the reduced kernel memory and reduced data handling by the kernel for 64KB pages speeds up opening new tabs in your browser and switching between them? I&#x27;d like hard numbers on a variety of real-life situations, not handwaves based off contrived situations.<br> </div> Sun, 12 Sep 2021 22:37:19 +0000 The folio pull-request pushback https://lwn.net/Articles/868986/ https://lwn.net/Articles/868986/ Sesse <div class="FormattedComment"> <font class="QuotedText">&gt; if you&#x27;re someone running grep over the kernel source repeatedly, you&#x27;ve likely got 5GB to spare</font><br> <p> I fail to find the logic in this?<br> <p> But to take another case: What if I want to read my email, which is on Maildir, and would like the mailbox to be in cache so that I can open it quickly? Is it reasonable to waste gigabytes of RAM (which I would prefer to use on opening a few extra tabs in my browser…) on 64 kB pages for each email?<br> </div> Sun, 12 Sep 2021 11:40:40 +0000 The folio pull-request pushback https://lwn.net/Articles/868967/ https://lwn.net/Articles/868967/ dvdeug <div class="FormattedComment"> <font class="QuotedText">&gt; In a previous folio discussion, Al Viro did a quick calculation showing just how much more memory it would take to keep the kernel source in memory with a larger page size. A 64KB size would quadruple the memory used, for example; it is not a small cost.</font><br> <p> Is that a realistic cost, though? 64KB would be 4832MB(? *); if you&#x27;re someone running grep over the kernel source repeatedly, you&#x27;ve likely got 5GB to spare. A kernel compilation is going to be a lot messier, with a lot more temporary files and executables fighting for file cache. I&#x27;ve got about 3000 files open on this system according to lsof, which is far less than the 71000 kernel source files. That&#x27;s an additional 192MB if each of them adds 64KB, which wouldn&#x27;t be noticed.<br> <p> There&#x27;s a lot more to be studied, but I&#x27;m not sure that quick calculation reflects anything that really matters.<br> <p> * Al Viro wrote &quot;64Kb 4832Mb&quot;; since he starts at 4Kb and everyone else says the base page is 4KB, not 4Kb, I assume that&#x27;s careless capitalization.<br> </div> Sat, 11 Sep 2021 22:38:01 +0000 The folio pull-request pushback https://lwn.net/Articles/868961/ https://lwn.net/Articles/868961/ smurf <div class="FormattedComment"> Ugh. Whatever happened to the idea that the proof is in the code?<br> <p> Yes, folios may be imperfect and not-abstracted enough, but they *are* a step in the right direction and further improvements can be built built on top of them.<br> <p> I don&#x27;t see an argument that folios block any of the other work that somebody else might be doing (but, or so it seems, currently isn&#x27;t).<br> </div> Sat, 11 Sep 2021 19:51:53 +0000 The folio pull-request pushback https://lwn.net/Articles/868956/ https://lwn.net/Articles/868956/ flussence <div class="FormattedComment"> This seems like it&#x27;s becoming the next BKL... a huge amount of churn, even though the improvements are measurable and significant it&#x27;s going to take some time to convince everyone. Hopefully not as long as that though!<br> </div> Sat, 11 Sep 2021 18:29:37 +0000 The folio pull-request pushback https://lwn.net/Articles/868928/ https://lwn.net/Articles/868928/ koverstreet <div class="FormattedComment"> My recap:<br> <p> <a href="https://lore.kernel.org/linux-fsdevel/20210911012324.6vb7tjbxvmpjfhxv@box.shutemov.name/T/#m336504b10569e83ce3370926b4a18bd9bb4f9dfb">https://lore.kernel.org/linux-fsdevel/20210911012324.6vb7...</a><br> </div> Sat, 11 Sep 2021 04:23:11 +0000