From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Vlastimil Babka <vbabka@suse.cz>, Conor Dooley <conor@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Pekka Enberg <penberg@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Rustam Kovhaev <rkovhaev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Josh Triplett <josh@joshtriplett.org>,
Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Alexander Shiyan <shc_work@mail.ru>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>, Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Stafford Horne <shorne@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
openrisc@lists.librecores.org, linux-riscv@lists.infradead.org,
linux-sh@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Conor.Dooley@microchip.com, Paul Cercueil <paul@crapouillou.net>
Subject: Re: Deprecating and removing SLOB
Date: Wed, 16 Nov 2022 17:02:11 +0900 [thread overview]
Message-ID: <b119e0b7-be10-46d8-886b-b5071b1b9562@opensource.wdc.com> (raw)
In-Reply-To: <Y3SYA31zobR6/qbj@casper.infradead.org>
On 2022/11/16 16:57, Matthew Wilcox wrote:
> On Tue, Nov 15, 2022 at 01:28:14PM +0900, Damien Le Moal wrote:
>> On 11/15/22 13:24, Damien Le Moal wrote:
>>> 6.1-rc5, SLOB:
>>> - 623 free pages
>>> - 629 free pages
>>> - 629 free pages
>>> 6.1-rc5, SLUB:
>>> - 448 free pages
>>> - 448 free pages
>>> - 429 free pages
>>> 6.1-rc5, SLUB + slub_max_order=0:
>>> - Init error, shell prompt but no shell command working
>>> - Init error, no shell prompt
>>> - 508 free pages
>>> - Init error, shell prompt but no shell command working
>>> 6.1-rc5, SLUB + patch:
>>> - Init error, shell prompt but no shell command working
>>> - 433 free pages
>>> - 448 free pages
>>> - 423 free pages
>>> 6.1-rc5, SLUB + slub_max_order=0 + patch:
>>> - Init error, no shell prompt
>>> - Init error, shell prompt, 499 free pages
>>> - Init error, shell prompt but no shell command working
>>> - Init error, no shell prompt
>>>
>>> No changes for SLOB results, expected.
>>>
>>> For default SLUB, I did get all clean boots this time and could run the
>>> cat command. But I do see shell fork failures if I keep running commands.
>>>
>>> For SLUB + slub_max_order=0, I only got one clean boot with 508 free
>>> pages. Remaining runs failed to give a shell prompt or allow running cat
>>> command. For the clean boot, I do see higher number of free pages.
>>>
>>> SLUB with the patch was nearly identical to SLUB without the patch.
>>>
>>> And SLUB+patch+slub_max_order=0 gave again a lot of errors/bad boot. I
>>> could run the cat command only once, giving 499 free pages, so better than
>>> regular SLUB. But it seems that the memory is more fragmented as
>>> allocations fail more often.
>>
>> Note about the last case (SLUB+patch+slub_max_order=0). Here are the
>> messages I got when the init shell process fork failed:
>>
>> [ 1.217998] nommu: Allocation of length 491520 from process 1 (sh) failed
>> [ 1.224098] active_anon:0 inactive_anon:0 isolated_anon:0
>> [ 1.224098] active_file:5 inactive_file:12 isolated_file:0
>> [ 1.224098] unevictable:0 dirty:0 writeback:0
>> [ 1.224098] slab_reclaimable:38 slab_unreclaimable:459
>> [ 1.224098] mapped:0 shmem:0 pagetables:0
>> [ 1.224098] sec_pagetables:0 bounce:0
>> [ 1.224098] kernel_misc_reclaimable:0
>> [ 1.224098] free:859 free_pcp:0 free_cma:0
>> [ 1.260419] Node 0 active_anon:0kB inactive_anon:0kB active_file:20kB
>> inactive_file:48kB unevictable:0kB isolated(anon):0kB isolated(file):0kB
>> mapped:0kB dirty:0kB writeback:0kB shmem:0kB writeback_tmp:0kB
>> kernel_stack:576kB pagetables:0kB sec_pagetables:0kB all_unreclaimable? no
>> [ 1.285147] DMA32 free:3436kB boost:0kB min:312kB low:388kB high:464kB
>> reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB
>> inactive_file:28kB unevictable:0kB writepending:0kB present:8192kB
>> managed:6240kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
>> [ 1.310654] lowmem_reserve[]: 0 0 0
>> [ 1.314089] DMA32: 17*4kB (U) 10*8kB (U) 7*16kB (U) 6*32kB (U) 11*64kB
>> (U) 6*128kB (U) 6*256kB (U) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3460kB
>> [ 1.326883] 33 total pagecache pages
>> [ 1.330420] binfmt_flat: Unable to allocate RAM for process text/data,
>> errno -12
>
> What you're seeing here is memory fragmentation. There's more than 512kB
> of memory available, but nommu requires it to be contiguous, and it's
> not. This is pretty bad, really. We didn't even finish starting up
> and already we've managed to allocate at least one page from each of
> the 16 512kB chunks which existed. Commit df48a5f7a3bb was supposed
> to improve matters by making exact allocations reassemble once they
> were freed. Maybe the problem is entirely different.
I suspected something like this when seeing the reported "free:859" :)
What I can try next is booting without SD card and the bare minimum set of
drivers to see if the fragmentation is still there or not. Would that help ?
These one page allocations may be for device drivers so never freed, no ?
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-11-16 8:02 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 15:55 Vlastimil Babka
2022-11-08 18:18 ` Christophe Leroy
2022-11-08 19:17 ` Andrew Morton
2022-11-08 18:46 ` Roman Gushchin
2022-11-08 20:13 ` Yosry Ahmed
2022-11-09 9:09 ` Vlastimil Babka
2022-11-08 21:44 ` Pasha Tatashin
2022-11-09 9:00 ` Vlastimil Babka
2022-11-09 15:50 ` Aaro Koskinen
2022-11-09 16:45 ` Geert Uytterhoeven
2022-11-09 17:45 ` Mike Rapoport
2022-11-09 21:16 ` Janusz Krzysztofik
2022-11-09 17:57 ` Conor.Dooley
2022-11-09 23:00 ` Damien Le Moal
2022-11-11 10:25 ` Vlastimil Babka
2022-11-12 1:40 ` Damien Le Moal
2022-11-11 10:33 ` Vlastimil Babka
2022-11-11 20:46 ` Conor Dooley
2022-11-12 1:40 ` Damien Le Moal
2022-11-14 1:55 ` Damien Le Moal
2022-11-14 5:48 ` Damien Le Moal
2022-11-14 9:36 ` Vlastimil Babka
2022-11-14 11:35 ` Damien Le Moal
2022-11-14 14:47 ` Hyeonggon Yoo
2022-11-15 4:24 ` Damien Le Moal
2022-11-15 4:28 ` Damien Le Moal
2022-11-16 7:57 ` Matthew Wilcox
2022-11-16 8:02 ` Damien Le Moal [this message]
2022-11-16 17:51 ` Vlastimil Babka
2022-11-17 0:22 ` Damien Le Moal
2022-11-21 4:30 ` Damien Le Moal
2022-11-21 17:02 ` Vlastimil Babka
2022-11-14 11:50 ` Hyeonggon Yoo
[not found] ` <Y25E9cJbhDAKi1vd@99bb1221be19>
[not found] ` <Y26FN02o7jhV87wl@localhost>
2022-11-11 21:11 ` [lkp] [+5395 bytes kernel size regression] [i386-tinyconfig] [b7c8731082] " Vlastimil Babka
2022-11-09 20:56 Paul Cercueil
2022-11-09 21:39 ` Linus Torvalds
2022-11-09 23:48 ` Aaro Koskinen
2022-11-09 23:51 ` Aaro Koskinen
2022-11-10 4:40 ` Theodore Ts'o
2022-11-10 7:31 ` Vlastimil Babka
2022-11-10 7:54 ` Feng Tang
2022-11-10 16:20 ` Matthew Wilcox
2022-11-11 9:37 ` David Laight
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=b119e0b7-be10-46d8-886b-b5071b1b9562@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=42.hyeyoo@gmail.com \
--cc=Conor.Dooley@microchip.com \
--cc=aaro.koskinen@iki.fi \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=conor@kernel.org \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=jmkrzyszt@gmail.com \
--cc=jonas@southpole.se \
--cc=josh@joshtriplett.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=openrisc@lists.librecores.org \
--cc=pasha.tatashin@soleen.com \
--cc=paul@crapouillou.net \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=rkovhaev@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=shc_work@mail.ru \
--cc=shorne@gmail.com \
--cc=stefan.kristiansson@saunalahti.fi \
--cc=tony@atomide.com \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ysato@users.sourceforge.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox