Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1244938
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#1083159: mount: tmpfs size for /tmp is randomly ignored |
| Date | 2025-05-06 13:00 +0200 |
| Message-ID | <KJobL-17H1-1@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <JtudH-gEYU-1@gated-at.bofh.it> <KiH2p-XUf-1@gated-at.bofh.it> <KJnz3-17tW-3@gated-at.bofh.it> <Jt6XL-gqt9-9@gated-at.bofh.it> <KJnz3-17tW-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
On 2025-05-06 12:13:24 +0200, Vincent Lefevre wrote:
> On 2025-02-21 20:33:21 +0100, Salvatore Bonaccorso wrote:
[...]
> > So size is only showed if sbinfo->max_blocks != shmem_default_max_blocks().
> >
> > Let's look at shmem_default_max_blocks():
> >
> > 147 #ifdef CONFIG_TMPFS
> > 148 static unsigned long shmem_default_max_blocks(void)
> > 149 {
> > 150 return totalram_pages() / 2;
> > 151 }
[...]
The bug may be the use of totalram_pages(), while the documentation
says:
> > size=bytes
[...]
> > The size may also have a % suffix to limit this instance
> > to a percentage of physical RAM.
^^^^^^^^^^^^
According to https://stackoverflow.com/a/60882958/3782797 (and
the answer given b MistralAI) it is get_num_physpages() that
gives the whole physical memory.
I suspect that totalram_pages() is not constant over the time,
so using it is buggy as there is no way for the user to know
what size is actually used for the 50% default.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#1083159: mount: tmpfs size for /tmp is randomly ignored Vincent Lefevre <vincent@vinc17.net> - 2025-05-06 12:20 +0200 Bug#1083159: mount: tmpfs size for /tmp is randomly ignored Vincent Lefevre <vincent@vinc17.net> - 2025-05-06 13:00 +0200
csiph-web