Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #87395

Bug#1083159: mount: tmpfs size for /tmp is randomly ignored

Path csiph.com!weretis.net!feeder8.news.weretis.net!news.usenet.ovh!news.corradoroberto.it!gothmog.csi.it!bofh.it!news.nic.it!robomod
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 Tue, 06 May 2025 13:00:01 +0200
Message-ID <KJobL-17H1-1@gated-at.bofh.it> (permalink)
References <Jt6XL-gqt9-9@gated-at.bofh.it> <JtaRH-gsSR-3@gated-at.bofh.it> <JtgX7-gwKw-1@gated-at.bofh.it> <JthzP-gxd2-11@gated-at.bofh.it> <Jt6XL-gqt9-9@gated-at.bofh.it> <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>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue May 6 10:57:08 2025
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -4.199
Reply-To Vincent Lefevre <vincent@vinc17.net>, 1083159@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Kernel Team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message followup 1083159
X-Debian-Pr-Package src:linux
X-Debian-Pr-Keywords moreinfo
X-Debian-Pr-Source linux
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Disposition inline
Content-Transfer-Encoding 8bit
X-Mailer-Info https://www.vinc17.net/mutt/
User-Agent Mutt/2.2.13+86 (bb2064ae) vl-169878 (2025-02-08)
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1903526
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 35
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc 1083159@bugs.debian.org
X-Original-Date Tue, 6 May 2025 12:54:17 +0200
X-Original-Message-ID <20250506105417.GS3693149@cventin.lip.ens-lyon.fr>
X-Original-References <20241002124321.GA3948@cventin.lip.ens-lyon.fr> <vmbukdij3ac5rzapwt7mv7metgzkfgc2dffcfixzywaejtzils@62xlswcxqev6> <20241002232401.GA7569@qaa.vinc17.org> <20241002235611.GA23858@qaa.vinc17.org> <20241002124321.GA3948@cventin.lip.ens-lyon.fr> <20241003132947.GA8516@cventin.lip.ens-lyon.fr> <Z7jVAfQzVqdzWDVp@eldamar.lan> <20250506101324.GR3693149@cventin.lip.ens-lyon.fr> <20241002124321.GA3948@cventin.lip.ens-lyon.fr> <20250506101324.GR3693149@cventin.lip.ens-lyon.fr>
Xref csiph.com linux.debian.bugs.dist:1244938 linux.debian.kernel:87395

Cross-posted to 2 groups.

Show key headers only | View raw


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.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Bug#1083159: mount: tmpfs size for /tmp is randomly ignored Vincent Lefevre <vincent@vinc17.net> - 2024-10-03 15:40 +0200
  Processed: Re: Bug#1083159: mount: tmpfs size for /tmp is  randomly ignored "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-10-03 15:40 +0200
  Bug#1083159: mount: tmpfs size for /tmp is randomly ignored Salvatore Bonaccorso <carnil@debian.org> - 2025-02-21 20:40 +0100
    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