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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56532C4332F for ; Wed, 16 Nov 2022 08:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232876AbiKPIC1 (ORCPT ); Wed, 16 Nov 2022 03:02:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbiKPIC0 (ORCPT ); Wed, 16 Nov 2022 03:02:26 -0500 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14FE8626D for ; Wed, 16 Nov 2022 00:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668585745; x=1700121745; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWEuM1zwwcE=; b=odAvg4r0MoJW9EFd1RuOYDqK+kVzhBtbKFDzL2qMFHfXCIQ5Cu6w5ubK 3jRrQxtRQ8L98IRIJFSFlPf0GmcmQ2yaZDunN/2HpDnD7Fiq+bX16+CYs aGJQNHpypTzyzv5vuRx+7r2gzCt8UB5IqdTSg0Jg+/n3Il1AsYK7kNgJx 8RoNayJK49kvw+CLI0/OjUzmqa2Y7HMKAJTvbLThV0qNiPcuOWGTKeTI5 a+G7RQb2SGAPsjfKxMxNg3CV/l0QmYflG4tTgVmMN4/ZRv3PZ1ouABhCM dpfjYyc7geXTUytu33kgBTrCG9d6VPLeq/sM+N+1Xe05ZnS8DTWI02ERV Q==; X-IronPort-AV: E=Sophos;i="5.96,167,1665417600"; d="scan'208";a="216718598" 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:24 +0800 IronPort-SDR: Vq5HPB/dftONCCwdassJP1VcyLSkwTLftM+1tudLlDcCoYa0bwelP7A3pFbwlK0ySDmP07AxhM W1/owQdFixhsw5aHid12mqD8gZL/hwF8a4m3YosiEpSfeTp3X/MiEPOS+jemMt7c50DibnhHGo jfs+RNNrvaZ/VCMEha4w4UFM502k0Knv2CSrBH4CLJ0TkfzarguAM4M7MdGEPmEDeXTBUqfuJQ ldELV2Mhjl5ypRs8T8XnXo3Yl+QUWs94XKVPL0+Dk8Q50Fa/HPSHR0L0/bmKN5pZ7EhNYMB6OE bOs= 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:36 -0800 IronPort-SDR: uR27QlpkVBj9VKshEGioUE+G0hqpO/A/mBYOyUfkJuUigzXdCafDVw/APtO26LIvl9Mn5PPy8V hqI8JuRVth7IiJDGgJhJxDEjykuwPG9I8r+/9G5Lo4+oauimvEERIa1un+7n89jvzyKGi+GFwy q2mWzmoz0cw0D5gmFrxbkvbjVIk57is2vwlDKy5jZey5M2WJr2QMUjyHhpCWkPB42bpDqW9WCL /BxayzRsAOQXq2fFu+YviDSuNH2CCw67zhebyGoaR2AAJl2cjxUlLZQRlQA1WlUiFfzRlB+nOw pXI= 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:25 -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 4NBwWN0YhSz1RwvL for ; Wed, 16 Nov 2022 00:02:23 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com 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= 1668585741; x=1671177742; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWE uM1zwwcE=; b=HA1Ry+cg6RJ2gjCP8QzPoYEqbM+un5RWNEqtxmceQW57Bclcbag NGVq1I/ljnUAG7e+dWbg6SHQpAYCbV7sOdCxgqFgZ4pzgoNsKHS4IH8zUw04Ehu5 dOBiDPL4KmGViD3JeZAwkB6etQOKepL41kIde5Ba4pgzbuGnRM1pZxWBs7ausiGW xHuUG/WUR1me2OOtLMdfMVusiCeskJy/VucmD/2wmEsQcj4UuKvYmRVFE6j4LVqm 2iq97BemLKEd79gUPRS2/gmHt/dXWiGkEr5tvvvKOvf7ul4Wt6jiIkw7aMRmg/5x PB1wyQR574lwPScueQHcrY1HZ3N0U57D1/A== 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 qZy19v1DlJhX for ; Wed, 16 Nov 2022 00:02:21 -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 Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA6F6C4332F for ; Wed, 16 Nov 2022 08:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/FT/DYlvdFqONr9JlxBLi/V7S6737JSVfoLJsqLq69E=; b=oiojCGuEISns86 ZezdKjN18cUZOL2zWvsxjWmJw02Y0qntJ4QWErZA01lmEFK4PIvSve0CebittoHd80H/WAmzxjc1o Vu4/XCSst9uS/cZjYKVo1UcRopVLMsJpfP+RXpgOcy4Oku45T/dFSa3T27mdfKY4kf/EiNbWyueA2 tgAfqWBwOOuT2Aty45eNc6Uh1agj4KNLGtgr3TRPJ9F6IK6BnEVd2pHKxKTQfLE55y0ZhNS8MTM7N OTmjLu4g6aMmJO3lt+ohPTkxSO/xIVcw2Unnkkkd2ZnykoKGzPxZumwqbOnCFpfRftdRiGp0ymefU EEdIsBwHmtXlTIMATLrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDNZ-0012Ia-Ix; Wed, 16 Nov 2022 08:02:41 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDNP-0012Es-9O for linux-riscv@lists.infradead.org; Wed, 16 Nov 2022 08:02:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668585751; x=1700121751; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWEuM1zwwcE=; b=caPyWep+dOy1TZGa8k4S/AbEfyfnqBXinxcZFiJEzolnUaJ8m0wzbKFD WFYOpwdPNE2KGWMZNK5S8AQlY7dY31ThGQfmpNKoUHqPbz7jyOltnnHmw fecica87UnvV/u71S72cdDG14nHIw1zDwdCA4HrWkgFNzS5XIrD/0qnev 17HeOAYvKMtUr83C7DKGzDNYZyPeDail4y+2+VfBfqVBKLlwKM/DjzwsX CbkFTvK8+YGFS+gLo4qV9tEUSztCrePpHR/lcN5UKTfDPkYXPzCrxZ3Y2 hj1RZ0SQhBCouU3vn4BbR3TFYbHpwHqEa1I4NCl+Z3mRsSlNG4xA5agrW Q==; X-IronPort-AV: E=Sophos;i="5.96,167,1665417600"; d="scan'208";a="214661341" 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:23 +0800 IronPort-SDR: /EDWscyk/WPwZ564QSfarINR3Igo03/f828XUOnz6QGKIx7nndtwWH6mKJlR9NupkWE/6LA5aw ZD5UGzSMzOgQSbWDV77ImlnFuU1VOFq5pfRuQi9m5Tz89vI8Yb8bCWRY/mf/ZDLhP9AuRpwZh5 I2/A42N8zRJAhuvj8LFgxhF85lHwmRC1Gry2kL6hq9D0NTh4/SmgX/AqbbotwKSltiup1ExVWm LDtznUSaCmQun361mb6ySc3c36T90zcKWdZpOn+BRD6VBrOmZkJzQSHhKE2CBNvsMEt9CzmP9r 9BU= 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: 60cubt/aGmgIOXnyKSQkQzqMypxoAhsbQbUADcY10TbFGuH5bLJnvUlEgEeDvrG6gRRXxvJ0FM TQZe0BgZaAMN25DElYbvVwhPiv0iLscLAMtIhlJyatYvg1vbyWcL4TKxaMP08dovnqptVkVFh6 buWDPVVNpnGoCsCd5JhXuw4vcB+sOjPEgLizbPDyyvnPVAs3AlOro7gD1ft03i3dDPC0e0kqm5 BWCSjD7oJqQwEID/eAd90cqpnwT18MQdi4qkNze8y22B/jUoPwXyV2c77GDZVXBWpxbjAP0Y9k u7U= 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:24 -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 4NBwWL1bssz1RvTr for ; Wed, 16 Nov 2022 00:02:22 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com 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= 1668585741; x=1671177742; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWE uM1zwwcE=; b=HA1Ry+cg6RJ2gjCP8QzPoYEqbM+un5RWNEqtxmceQW57Bclcbag NGVq1I/ljnUAG7e+dWbg6SHQpAYCbV7sOdCxgqFgZ4pzgoNsKHS4IH8zUw04Ehu5 dOBiDPL4KmGViD3JeZAwkB6etQOKepL41kIde5Ba4pgzbuGnRM1pZxWBs7ausiGW xHuUG/WUR1me2OOtLMdfMVusiCeskJy/VucmD/2wmEsQcj4UuKvYmRVFE6j4LVqm 2iq97BemLKEd79gUPRS2/gmHt/dXWiGkEr5tvvvKOvf7ul4Wt6jiIkw7aMRmg/5x PB1wyQR574lwPScueQHcrY1HZ3N0U57D1/A== 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 1BNLTFeI7Inz for ; Wed, 16 Nov 2022 00:02:21 -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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_000231_458149_E87823A7 X-CRM114-Status: GOOD ( 23.18 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 mail.librecores.org (lists.librecores.org [88.198.125.70]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43E81C433FE for ; Wed, 16 Nov 2022 08:02:38 +0000 (UTC) Received: from [172.31.1.100] (localhost.localdomain [127.0.0.1]) by mail.librecores.org (Postfix) with ESMTP id 007A224785; Wed, 16 Nov 2022 09:02:38 +0100 (CET) Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by mail.librecores.org (Postfix) with ESMTPS id 8E6362499F for ; Wed, 16 Nov 2022 09:02:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668585756; x=1700121756; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWEuM1zwwcE=; b=qLNNm8hT4nyJSMSpi3eUDo+dizdOgqml6J1HAZSOsG79tYQjWOHwBJzg acl6oUr5Wl4wrXxq9enp2UphOL0IkeKL0bk9DtOyUZgOGPVNaY7E7jIyZ DnjE4cUWt99aIOhJsBX32hhwlfjcmjbwxKBCEyU0+LmR5jjsKOsl8oxGu YzcbgLA2yD5PYoXBswfCPFpmyONI9Nj9sCqHxLI2D8L6Tu8lHPKOy6NWH 2RIfctoa8qeuet28h6rWKVvi1MoAIka3ZkxDkivnYU1K5jLKV0S56if1V vG87NF/jIfsDy1QexD779aJAAdX16Iwoj8Ev4GawlLGp37M8e7dpLkBHd g==; X-IronPort-AV: E=Sophos;i="5.96,167,1665417600"; d="scan'208";a="320737356" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 16 Nov 2022 16:02:24 +0800 IronPort-SDR: QOyO4GCL7nhx/hv79vaXlaVhHKZXHdM8UzPg8n/ydr83ZubzbS+sTV0bFXHbYp7dxiDEBZxf14 pmlSwM4/wgs9CBNrRU1QXaFRe6nlewgSeW/SLD+u8WmwU1eL8Y5C+IPkc0WUQjNfgcBaFL1xsG aMEtm3IElj51jwmh+b17NHtk8isnuOM1XUAoiL7+kDgFp9R6QaKLIBCBIF8L/9amdgE/EvWJvM Lek7kunU1JFgQZgFbe0zf/VbraU8eR1hjQ6MJxgkO+L9q9nN8hTvcEHN50g7GEH+CVHS/STxfS 8KI= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Nov 2022 23:21:20 -0800 IronPort-SDR: cPpkRvVkNY9mOMKy0c3qUDshlyDihmoc/4Ftliv4zOI7u7SJ4KtPm4/ne2ISrxGgicUsu8NGg5 ErsebeVWlNm4Et3LL+qzAAGgpXuwQGwmwoMm8YBhzuHpdU4Yaad2ezGXsKQH8g+4FPodT+nzWS raLoNNwKdEwaBql/lX/VporjB4JtC6SxVDnonZb1psGqpCFh1ljXxP5szp5uN01AxGievOG040 EPhOja3331Qa1aBeTGMU5TWVUQ1X3GE8ODsmDrobJBe40ZlxtN482Edi2Ecig86YIE6rXvxxc2 jv0= 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:25 -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 4NBwWN08PFz1Rwrq for ; Wed, 16 Nov 2022 00:02:23 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com 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= 1668585741; x=1671177742; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWE uM1zwwcE=; b=HA1Ry+cg6RJ2gjCP8QzPoYEqbM+un5RWNEqtxmceQW57Bclcbag NGVq1I/ljnUAG7e+dWbg6SHQpAYCbV7sOdCxgqFgZ4pzgoNsKHS4IH8zUw04Ehu5 dOBiDPL4KmGViD3JeZAwkB6etQOKepL41kIde5Ba4pgzbuGnRM1pZxWBs7ausiGW xHuUG/WUR1me2OOtLMdfMVusiCeskJy/VucmD/2wmEsQcj4UuKvYmRVFE6j4LVqm 2iq97BemLKEd79gUPRS2/gmHt/dXWiGkEr5tvvvKOvf7ul4Wt6jiIkw7aMRmg/5x PB1wyQR574lwPScueQHcrY1HZ3N0U57D1/A== 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 DbC7cyzdBCKi for ; Wed, 16 Nov 2022 00:02:21 -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 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 X-BeenThere: openrisc@lists.librecores.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion around the OpenRISC processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-sh@vger.kernel.org, Tony Lindgren , Catalin Marinas , Roman Gushchin , Paul Cercueil , "linux-mm@kvack.org" , Conor.Dooley@microchip.com, Hyeonggon Yoo <42.hyeyoo@gmail.com>, Christoph Lameter , linux-riscv@lists.infradead.org, Jonas Bonn , Alexander Shiyan , Aaro Koskinen , Janusz Krzysztofik , Russell King , "linux-arm-kernel@lists.infradead.org" , David Rientjes , Pasha Tatashin , Arnd Bergmann , Josh Triplett , openrisc@lists.librecores.org, Joonsoo Kim , Vlastimil Babka , Yoshinori Sato , "linux-kernel@vger.kernel.org" , Conor Dooley , Rustam Kovhaev , Pekka Enberg , Andrew Morton , Linus Torvalds Errors-To: openrisc-bounces@lists.librecores.org Sender: "OpenRISC" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F39B7C4332F for ; Wed, 16 Nov 2022 08:03:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kiCOM+4tgLX/L+ZTu79T3nwnlTN2tEAJX9AKyYlDMNc=; b=Yqzq9RVASB+pax CVqIIE816fU0pOOvbPqoPT3TkZ7Ob+P6B1DBuIJDzZYsOaDpQAB3MNKJNkGGl9PxQ+jKYPyuP5V+G DnFuo3J4CfCVRUQbrGTvu5rA8ASLp3sS3W6oCXJvBLBT9tgBWtFJf2WBeea1Oc63ylij8LAw78mDK PyPPoIJ/k4DGehC4wdwjGP61MH8AbJy/mYByeXcHBoVdXoVDv3VFg5r3sjOBqcN30bEykWS/zpcZ8 1dsYFnxHz83urblj9IVkVPKfws8cUCzDxoFVXy7jSGzHuorMRIjXC3GAFlFQ8CiOMH9hEHC6Zez1n 9rUmQYoYA1j3sYRWobiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDNR-0012Gn-2u; Wed, 16 Nov 2022 08:02:33 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDNM-0012Es-Gw for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 08:02:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1668585748; x=1700121748; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aiQ1E4MA/V7AYoAnhMYGLoTHKrhMUZFLqWEuM1zwwcE=; b=V1PGSXXLOldMq99cMAWQPLgCgEtjUlehhaUIetI0LeMCUA1CmOw13NxP f91s+cF/8XeOHlrdapmx8sba1gZsPy54zytiSJ0vpL0jaRty6nqSr4jYf wIsvqQATIGwJGCjV1ws3SK3CZSp7I7mSTUOiQtDLHBRd7X+QcDjwPDcwl O27c2nEy/2Q+Q7+igmMx0DPog7Mv8p2QPjhGKPOQAzfgrCLSmCavNXTVV yliwqtFiXAjBGKA/zRqKiFhNGt6AGscXPGkEAxojmhUsqDfsRZsx6pD76 dif54fkRSOKDNVDmCgryMNKi2ChUdeQpgu8LuYUkq0V8i0zOH6E93BEII Q==; X-IronPort-AV: E=Sophos;i="5.96,167,1665417600"; d="scan'208";a="214661339" 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: +MA3DkNPjSn0/QJnWs0gbrQ0io/+7RGJsOgdf1xOWb2u3O9yOPlcGmF3BgrdJ82+UHVUk0vtZe Ms+7b4VM8TspQmZFplXyHxf16DakC59m4qXo3TdJZ469icA1Vp1ASKelhgo0x+dMhC85er/eSC LLOPcycPzK25AB4DBEaQq/NDgr+i3E1OE8XVjWgElOoDMi/tS1VU+vw//vLKB90qNjhNYU3TqA vTKGcl3wLlDwsQJfBYGvi3GJWaqz0GUK0oEg4QVEzMeh0K+ShS7hioKVkSaW+JetyhxEwMFRnW wa0= 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: i9+ouovy1BqVWkjxkOqLdZf153h/QWE8pJdHFwDYJnRnP4oDsNLcpL4fCqkNPVgf8sVZhcrGHI 5sSHU8zTzcVAFBWzEudgVEgHHcLjhnd2lF8aZwh3BtwL3GASIW1bcLgUdOu08mc0bEBUMgIyDv /H9zS2G4UB3IuYg8gxKgvJwQQ1ycp02oVmu9REvyxWLqFZdDVwrtoq3BGqznybLcTGFTrzlCEO cm2+faa3DsNu8RH28MZMtIuDYSYGwVTsjRj9+vmGCt+3wEx1TExtOhpH8Gbh0U27u+mwN1fE/F 5tk= 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 4NBwWK6H9hz1RWy0 for ; Wed, 16 Nov 2022 00:02:21 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com 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 A1fo2hWMkUWz 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221116_000228_688018_30C75DB4 X-CRM114-Status: GOOD ( 24.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel