[Crash-utility] [External Mail]Re: zram decompress support for gcore/crash-utility
Dave Anderson
anderson at redhat.com
Wed Apr 1 16:28:54 UTC 2020
----- Original Message -----
> Hi,Dave
> Zram is a virtual device,it simulated as a block device,it's part of
> memroy/ramdump,just enable CONFIG_ZRAM,no other settings needed.
> you can refer to drivers/block/zram/zram_drv.c
> driver calling zram_meta_alloc to alloc memory from RAM.
>
> We want to be able to access these zram page like a normal page.
I understand all that. I'm just curious how makedumpfile will handle/filter
the physical RAM pages that make up the zram block device.
Anyway, send a patch and I'll take a look.
Dave
>
> ________________________________________
> From: Dave Anderson <anderson at redhat.com>
> Sent: Wednesday, April 1, 2020 23:24
> To: 赵乾利
> Cc: d hatayama; Discussion list for crash utility usage, maintenance and
> development
> Subject: Re: [External Mail]Re: [Crash-utility] zram decompress support for
> gcore/crash-utility
>
> ----- Original Message -----
> > Hi,Dave
> > zram is same with other swap device,but every swaped page will be
> > compressed then saved to another memory address.
> > The process is same with the common swap device,non-swap just a normal user
> > address,pgd and mmu will translate to phy address
> >
> > please refer to below information:
> > crash> vm -p
> > PID: 1565 TASK: ffffffe1fce32d00 CPU: 7 COMMAND: "system_server"
> > MM PGD RSS TOTAL_VM
> > ffffffe264431c00 ffffffe1f54ad000 528472k 9780384k
> > VMA START END FLAGS FILE
> > ffffffe0ea401300 12c00000 12e00000 100073
> > VIRTUAL PHYSICAL
> > ...
> > 144fc000 SWAP: /dev/block/zram0 OFFSET: 236750
> > ...
> > 1738e000 SWAP: /dev/block/zram0 OFFSET: 73426
> > 1738f000 21aa2c000
> > 17390000 1c3308000
> > 17391000 SWAP: /dev/block/zram0 OFFSET: 73431
> > 17392000 19c162000
> > 17393000 19c132000
> > 17394000 SWAP: /dev/block/zram0 OFFSET: 234576
> > 17395000 19c369000
> > 17396000 20b35c000
> > 17397000 18011e000
> > 17398000 SWAP: /dev/block/zram0 OFFSET: 73433
> > 17399000 1dc3d2000
> > 1739a000 1bc59f000
> > 1739b000 SWAP: /dev/block/zram0 OFFSET: 73437
> >
> >
> > crash> vtop -c 1565 144fc000
> > VIRTUAL PHYSICAL
> > 144fc000 (not mapped)
> >
> > PAGE DIRECTORY: ffffffe1f54ad000
> > PGD: ffffffe1f54ad000 => 1f54ab003
> > PMD: ffffffe1f54ab510 => 1f43b8003
> > PTE: ffffffe1f43b87e0 => 39cce00
> >
> > PTE SWAP OFFSET
> > 39cce00 /dev/block/zram0 236750
> >
> > VMA START END FLAGS FILE
> > ffffffe148bafe40 144c0000 14540000 100073
> >
> > SWAP: /dev/block/zram0 OFFSET: 236750
>
> Ok, so with respect to user-space virtual addresses, there is nothing
> other than handling zram swap-backed memory.
>
> So what you're proposing is that when reading user-space memory
> that happens to be backed-up on a zram swap device, then the user
> data could alternatively be read from the zram swap device, and
> presented as if it were present in physical memory?
>
> Are the physical RAM pages that make up the contents of a zram
> device collected with a typical filtered compressed kdump? If not,
> what makedumpfile -d flag is required for them to be captured?
>
> Dave
>
>
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
> This e-mail and its attachments contain confidential information from
> XIAOMI, which is intended only for the person or entity whose address is
> listed above. Any use of the information contained herein in any way
> (including, but not limited to, total or partial disclosure, reproduction,
> or dissemination) by persons other than the intended recipient(s) is
> prohibited. If you receive this e-mail in error, please notify the sender by
> phone or email immediately and delete it!******/#
>
More information about the Crash-utility
mailing list