From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Nathan Chancellor <nathan@kernel.org>,
Liu Shixin <liushixin2@huawei.com>
Cc: Seth Jennings <sjenning@redhat.com>,
Dan Streetman <ddstreet@ieee.org>,
Vitaly Wool <vitaly.wool@konsulko.com>,
Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next 2/3] mm/zswap: delay the initializaton of zswap until the first enablement
Date: Sat, 27 Aug 2022 10:01:16 +0800 [thread overview]
Message-ID: <c1c22a8b-bc27-41e0-e709-c2d9fb9bc11c@huawei.com> (raw)
In-Reply-To: <YwksRZPIfXmlOmHR@dev-arch.thelio-3990X>
On 2022/8/27 4:25, Nathan Chancellor wrote:
> Hi Liu,
>
> On Thu, Aug 25, 2022 at 10:20:36PM +0800, Liu Shixin wrote:
>> In the initialization of zswap, about 18MB memory will be allocated for
>> zswap_pool in my machine. Since not all users use zswap, the memory may be
>> wasted. Save the memory for these users by delaying the initialization of
>> zswap to first enablement.
>>
>> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
>> ---
...
>> This change is in -next as commit 22100432cf14 ("mm/zswap: delay the
>> initializaton of zswap until the first enablement"). I just bisected my
>> arm64 test system running Fedora failing to boot due to that commit,
>> with the following stack trace:
>>
>> Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000000
>> Mem abort info:
>> ESR = 0x0000000096000004
>> EC = 0x25: DABT (current EL), IL = 32 bits
>> SET = 0, FnV = 0
>> EA = 0, S1PTW = 0
>> FSC = 0x04: level 0 translation fault
>> Data abort info:
>> ISV = 0, ISS = 0x00000004
>> CM = 0, WnR = 0
>> user pgtable: 4k pages, 48-bit VAs, pgdp=00000020a4fab000
>> [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
>> Internal error: Oops: 96000004 [#1] SMP
>> Modules linked in: zram fsl_dpaa2_eth pcs_lynx phylink ahci_qoriq crct10dif_ce ghash_ce sbsa_gwdt fsl_mc_dpio nvme lm90 nvme_core at803x xhci_plat_hcd rtc_fsl_ftm_alarm xgmac_mdio ahci_platform i2c_imx ip6_tables ip_tables fuse
>> Unloaded tainted modules: cppc_cpufreq():1
>> CPU: 10 PID: 761 Comm: swapon Not tainted 6.0.0-rc2-00454-g22100432cf14 #1
>> Hardware name: SolidRun Ltd. SolidRun CEX7 Platform, BIOS EDK II Jun 21 2022
>> pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
>> pc : frontswap_init+0x38/0x60
>> lr : __do_sys_swapon+0x8a8/0x9f4
>> sp : ffff80000969bcf0
>> x29: ffff80000969bcf0 x28: ffff37bee0d8fc00 x27: ffff80000a7f5000
>> x26: fffffcdefb971e80 x25: ffffaba797453b90 x24: 0000000000000064
>> x23: ffff37c1f209d1a8 x22: ffff37bee880e000 x21: ffffaba797748560
>> x20: ffff37bee0d8fce4 x19: ffffaba797748488 x18: 0000000000000014
>> x17: 0000000030ec029a x16: ffffaba795a479b0 x15: 0000000000000000
>> x14: 0000000000000000 x13: 0000000000000030 x12: 0000000000000001
>> x11: ffff37c63c0aba18 x10: 0000000000000000 x9 : ffffaba7956b8c88
>> x8 : ffff80000969bcd0 x7 : 0000000000000000 x6 : 0000000000000000
>> x5 : 0000000000000001 x4 : 0000000000000000 x3 : ffffaba79730f000
>> x2 : ffff37bee0d8fc00 x1 : 0000000000000000 x0 : 0000000000000000
>> Call trace:
>> frontswap_init+0x38/0x60
>> __do_sys_swapon+0x8a8/0x9f4
>> __arm64_sys_swapon+0x28/0x3c
>> invoke_syscall+0x78/0x100
>> el0_svc_common.constprop.0+0xd4/0xf4
>> do_el0_svc+0x38/0x4c
>> el0_svc+0x34/0x10c
>> el0t_64_sync_handler+0x11c/0x150
>> el0t_64_sync+0x190/0x194
>> Code: d000e283 910003fd f9006c41 f946d461 (f9400021)
>> ---[ end trace 0000000000000000 ]---
>>
>> This is with Fedora's configuration:
>>
>> https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-aarch64-fedora.config
>>
>> If there is any more information I can provide or patches I can test, I
>> am more than happy to do so!
Thanks for your reporting,we will check it.
>
> Cheers,
> Nathan
>
> .
next prev parent reply other threads:[~2022-08-27 2:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 14:20 [PATCH -next 0/3] Delay the initializaton of zswap Liu Shixin
2022-08-25 14:20 ` [PATCH -next 1/3] mm/zswap: replace zswap_init_{started/failed} with zswap_init_state Liu Shixin
2022-08-25 14:20 ` [PATCH -next 2/3] mm/zswap: delay the initializaton of zswap until the first enablement Liu Shixin
2022-08-26 2:01 ` Andrew Morton
2022-08-26 20:25 ` Nathan Chancellor
2022-08-27 1:43 ` Andrew Morton
2022-08-27 2:01 ` Kefeng Wang [this message]
2022-08-27 10:21 ` Liu Shixin
2022-08-25 14:20 ` [PATCH -next 3/3] mm/zswap: skip confusing print info Liu Shixin
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=c1c22a8b-bc27-41e0-e709-c2d9fb9bc11c@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liushixin2@huawei.com \
--cc=nathan@kernel.org \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.com \
/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