From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C04DC433FE for ; Wed, 16 Nov 2022 08:02:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9E2B8E0001; Wed, 16 Nov 2022 03:02:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C4E256B0072; Wed, 16 Nov 2022 03:02:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC8BB8E0001; Wed, 16 Nov 2022 03:02:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9C6CD6B0071 for ; Wed, 16 Nov 2022 03:02:26 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5F532AB063 for ; Wed, 16 Nov 2022 08:02:26 +0000 (UTC) X-FDA: 80138563092.27.6346D30 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf09.hostedemail.com (Postfix) with ESMTP id 46FCB14000A for ; Wed, 16 Nov 2022 08:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668585744; x=1700121744; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWEuM1zwwcE=; b=mngN03wJYTkprAx/ORZqvd79fB775RGsHHcCmdA6TPcHiIhTXAt5qfhc IDZ++BeOPAvhNtIZ5a9rNY7+c4mcRnOoVSzaUpjMM5Pk9w+G1mRChO4J/ 9zIu+p2kGvU2oJct6oio6lBAPCJmXJtHP4pWMHIOlYT2h9cYWtoj/Me1I 9Kccf59mRTZGy8JnOPVpeguu12jV5MTL4wect47qh8XEWlnmWcsdfWQut Mz3//hOZc9yE2Imug0AVeja+oVnF1+QutoYrZVc7F0y6+MRwomzDP8FEd s3orBwYzHJV4NEHorpSeC56uenismzin+6VPFmRGgBFIfwCTxivnKEtdq g==; X-IronPort-AV: E=Sophos;i="5.96,167,1665417600"; d="scan'208";a="216398300" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 16 Nov 2022 16:02:22 +0800 IronPort-SDR: WikFZcdzV1v/UnwZsOvvJNbNrexH9WabdsJsEg4kh7jC+vFsd8AaKzk1JMJARDYThuvow8Abis fYOog9YmYYAACJPnOazcqgIZ/qP+8aA/Ima2LQqJ4J7MuI+Ps8la0HFXr1/H0lpd6O1JpwVTYr OhdnhWJcQgHD3CG/r9N4JSJ3fXqW+NbYSGWDKwh3z/oKfdDc7Q055DcK1P6k0pfZnWg1ZCB/Hr T00MZUHHnu4jMmTZu+7B3lV2UQ61f9oELDlP3KzrGxE1kVO9CQNTRa4MSnnKM8YfVkq2aDVDwy 8cA= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Nov 2022 23:15:34 -0800 IronPort-SDR: lBXzL13whX3IXdfrki/8R7vRgASsJwqgzWmvmkLH477LLVmnp1bqX13WdhVB0JLorXZfHrMJIZ 3hXCYNQsxs/i1rJVCtcGIkQcxE7UGdjZ6YLrySvsuHFq4KD8+RUwKcdWb1tCP/9ybE7+IW4TKC CkaKHKH4kcWo9ftJb9P+7g6IjwGuNYVcrRaKokUHy0DKskMky9RWGHcXUyQSTHB9ne5BidB4Qm 70gupC1kXwMMbO4lY6RH8WyQlFRk5VyBdyhZIHfjFXlapNKap/Txv3UDrgaP2e5Fof6rpykUBk cI0= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Nov 2022 00:02:23 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4NBwWK5ySVz1Rx15 for ; Wed, 16 Nov 2022 00:02:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1668585740; x=1671177741; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWE uM1zwwcE=; b=hdZa3KjwjCP+zobptX+TYBaWDRq+niaGBKZNqK4WbXEsNSwavmx cUywVHBdz9AfXs0to7hesyrQ2NWAl2it/5LxRsnt31Y1Nwz0QotwGD1GyOdU7h1r lF2IEAiPhXR0YixGF8rl/oIAADace+mzN5uFTNNMtfHZh1b7+STGBqhhYdXZp/Dz vGRWrTISYkzpbFDqtddZUypWBqnvzHD0Epxn77mA56wYhXDDu0lLWBjrCdi4Y86j NwGAEAGKRiOoYB8erbrLYp2xLTqj5bd1I4UfWc9FHWdmVvCCQFMwqqio06GHNLgz KXgtVJNH3CLEKLoRjhAAKK8b25on/CuMLtQ== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fskCbusVvZ2y for ; Wed, 16 Nov 2022 00:02:20 -0800 (PST) Received: from [10.89.82.19] (c02drav6md6t.dhcp.fujisawa.hgst.com [10.89.82.19]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4NBwW94Qxqz1RvLy; Wed, 16 Nov 2022 00:02:13 -0800 (PST) Message-ID: Date: Wed, 16 Nov 2022 17:02:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Deprecating and removing SLOB Content-Language: en-US To: Matthew Wilcox Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Vlastimil Babka , Conor Dooley , Pasha Tatashin , Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , Roman Gushchin , Linus Torvalds , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Catalin Marinas , Rustam Kovhaev , Andrew Morton , Josh Triplett , Arnd Bergmann , Russell King , Alexander Shiyan , Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Yoshinori Sato , Rich Felker , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "linux-arm-kernel@lists.infradead.org" , openrisc@lists.librecores.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, Geert Uytterhoeven , Conor.Dooley@microchip.com, Paul Cercueil References: <93079aba-362e-5d1e-e9b4-dfe3a84da750@opensource.wdc.com> <44da078c-b630-a249-bf50-67df83cd8347@suse.cz> <35650fd4-3152-56db-7c27-b9997e31cfc7@opensource.wdc.com> <97c0735c-3127-83d5-30ff-8e57c6634f6e@opensource.wdc.com> <0e45a2f2-6dd5-5a43-c1a0-7520c1ed2675@opensource.wdc.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668585745; a=rsa-sha256; cv=none; b=YpQweCrAqFAGcQ5Wc9Ur3/Feh39+WdGGWbfzTjhus5jl9+6hC1wVZzMiNy86prvvXsJxBC HZZy6yFIsfDi4qbIWmS6Ql/IaMQeXllacJ62M8COjw4xYKg5mSfKV/SVd5t+Eh1Qv+jrRq tHTL+Vu5sD9IsYs9i54rj1P75e54eb4= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b=mngN03wJ; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=hdZa3Kjw; spf=pass (imf09.hostedemail.com: domain of "prvs=312a04a72=damien.lemoal@opensource.wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=312a04a72=damien.lemoal@opensource.wdc.com"; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668585745; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8yGT+L0yFPeIu4j/hYL7PzahSPB5TGVeNO2JXT9/asE=; b=Y8b+SqxNJJhODS44W5w4B2TZHnLyEtbEYCrrwXBcpu2hjW5TAn+TVkaBYQr6kG4fBi1AXb XSBYbqi1uX/LThWDsnQc+Yn5wvVYgz/c3Jrir636PPTBdv4aQ5jRytM3uKhT590ukJgUbX hq73/BB41fMqtykhndiZdSmhhzq2sRQ= X-Stat-Signature: bcad33qknhpzy5ber6tjknpynq6img49 X-Rspamd-Queue-Id: 46FCB14000A Authentication-Results: imf09.hostedemail.com; dkim=none ("invalid DKIM record") header.d=wdc.com header.s=dkim.wdc.com header.b=mngN03wJ; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=hdZa3Kjw; spf=pass (imf09.hostedemail.com: domain of "prvs=312a04a72=damien.lemoal@opensource.wdc.com" designates 216.71.153.144 as permitted sender) smtp.mailfrom="prvs=312a04a72=damien.lemoal@opensource.wdc.com"; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1668585744-77840 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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