From: -Gary- <me@garybgenett.net>
To: Qian Cai <cai@lca.pw>
Cc: Vlastimil Babka <vbabka@suse.cz>, Hugh Dickins <hughd@google.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] shmem: make shmem default size a define value
Date: Wed, 9 Oct 2019 13:17:46 -0700 [thread overview]
Message-ID: <20191009201745.GF22291@spider> (raw)
In-Reply-To: <1570647695.5937.16.camel@lca.pw>
> > @@ -125,14 +128,14 @@ struct shmem_options {
> > #ifdef CONFIG_TMPFS
> > static unsigned long shmem_default_max_blocks(void)
> > {
> > - return totalram_pages() / 2;
> > + return SHMEM_SIZE_DEFAULT;
> > }
> >
> > static unsigned long shmem_default_max_inodes(void)
> > {
> > unsigned long nr_pages = totalram_pages();
>
> This is now unused.
Mind telling me what I missed, Qian?
I pulled from:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Latest commit is:
2019-10-08 15:36:04 -0700 e3280b54afed870d531571212f1fc375df39b7d2 Merge tag 'led-fixes-for-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
My patch is based on that, where the above code still exists, and nr_pages is still referenced below. Apparently, it is making totalram_pages atomic, according to the commit that changed it:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/mm/shmem.c?id=ca79b0c211af63fa3276f0e3fd7dd9ada2439839
Should I be pulling from somewhere else, or also re-hacking nr_pages somehow?
-- Gary
> > - return min(nr_pages - totalhigh_pages(), nr_pages / 2);
> > + return min(nr_pages - totalhigh_pages(), SHMEM_SIZE_DEFAULT);
> > }
> > #endif
next prev parent reply other threads:[~2019-10-09 20:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 18:46 [PATCH] shmem: make shmem default size a define value Gary B. Genett
2019-10-09 19:01 ` Qian Cai
2019-10-09 20:17 ` -Gary- [this message]
2019-10-09 20:56 ` Qian Cai
2019-10-09 23:17 ` -Gary-
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191009201745.GF22291@spider \
--to=me@garybgenett.net \
--cc=cai@lca.pw \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.