[Crash-utility] zram decompress support for gcore/crash-utility
Dave Anderson
anderson at redhat.com
Wed Apr 1 14:20:05 UTC 2020
----- Original Message -----
...
> >
> > As far as the gcore extension module, that is maintained by Daisuke Hatayama,
> > and he make all decisions w/respect to that codebase. I've cc'd this response
> > to him.
>
> Thanks Zhao for your patch set.
> Thanks for ccing me, Dave.
>
> I agree that ZRAM support is useful as your explanation. On the other
> hand, it is not only for crash gcore command, but also for crash utility. I think
> it more natural than the current implementation of your patch set that you
> implement a ZRAM support in crash utility and then do it in crash gcore command.
>
> If the ZRAM support were transparent to readmem() interface, there would be no need
> to implement crash gcore command at all. If not, there would be need to add a new code
> for the ZRAM support just corresponding to the following stanza in
> 0001-gcore-add-support-zram-swap.patch:
>
> @@ -225,6 +417,18 @@ void gcore_coredump(void)
> strerror(errno));
> } else {
> pagefaultf("page fault at %lx\n", addr);
> + if (paddr != 0) {
> + pte_val = paddr;
> + if(try_zram_decompress(pte_val, (unsigned char *)buffer) == PAGE_SIZE)
> + {
> + error(WARNING, "zram decompress successed\n");
> + if (fwrite(buffer, PAGE_SIZE, 1, gcore->fp) != 1)
> + error(FATAL, "%s: write: %s\n", gcore->corename, strerror(errno));
> + continue;
> + }
> +
> + }
I'm not clear on how zram is linked into the user-space mapping. For user space that
has been swapped out to a zram swap device, I presume it's the same as is, but it
references the zram swap device. But for other user-space mappings (non-swapped),
what does the "vm -p" display for user space virtual address pages that are backed
by zram? And for that matter, what does "vtop <address>" show?
Thanks,
Dave
More information about the Crash-utility
mailing list