Hi Kazu, Thanks for your review and comments!
On Wed, Oct 5, 2022 at 4:30 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio...@nec.com> wrote: > > On 2022/09/20 0:10, Tao Liu wrote: > > Patchset [1] introduces maple tree data structure for linux, and the > > modification on mm subsystem. > > > > The main impact on crash utility, is the modification on vm_area_struct. > > Patch [2][3] removed the rbtree and linked list iteration of > > vm_area_struct, making it impossible for crash to iterate vma > > in the traditional way. For example, we can observe the failing > > of crash cmd vm/fuser on kernel which has integrated with patchset [1]. > > > > This patchset deals with the issue by porting and adapting > > kernel's maple tree vma iteration code to crash utility. It has been > > tested on linux-next-next-20220914 [4]. > > > > Patch 1: the pure copy-and-paste work, extracting related kernel > > structures, functions, constants to crash. > > Patch 2: minimal code modification for crash adaption, kernel > > structures are kept for member resolving. > > Patch 3: modification on crash memory.c to use the maple vma > > iteration. > > > > The idea is to make patch 1-3 a POC work. > > > > Patch 4: Get rid of kernel structures by rewriting the structure > > member resolving code into the crash way, aka change > > "node->member" into "readmem(node) and OFFSET(member)" > > Patch 5: print the added variables of offset/size table > > Patch 6: Get rid of the compiling-time assgined arrays. > > > > Patch 4-6 will make the POC work formal for use. > > Thank you for working on this! and sorry for the delay. > np. > The patchset on the whole looks good and no problem was detected > so far at my end. Some comments below and inline. > > - Ideally it's better also for "tree" command to support the maple > tree like "tree -t maple", is it possible? > > It's ok at all to do this later, but the maple tree looks too > complicated to me to be supported fully by the tree command.. > If it looks possible, it might be better to have some preparation > at this point. > Yes, I plan to support maple tree in tree cmd, I don't know if it can be compatible with tree cmd, but it is worth trying. I will go with another patchset for tree cmd support of maple tree. > - Please fix the compilation warnings with "make clean ; make warn". OK, I will get it fixed in v2, as well as the comments you inlined in other patches. Thanks, Tao Liu > > Thanks, > Kazu > > > > > > > [1]: > > https://lore.kernel.org/all/20220906194824.2110408-1-liam.howl...@oracle.com/ > > [2]: > > https://github.com/oracle/linux-uek/commit/d19703645b80abe35dff1a88449d074b0b5b1bb1 > > [3]: > > https://github.com/oracle/linux-uek/commit/91dee01f1ebb6b6587463b6ee6f7bbc4965f91d5 > > [4]: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/snapshot/linux-next-next-20220914.tar.gz > > > > Tao Liu (6): > > Port linux maple tree related files to crash > > Maple tree kernel code modification for step 1 > > Introduce maple tree vma iteration to memory.c > > Maple tree kernel code modification for step 2 > > Dump maple tree offset variables by help -o > > Remove mt_slots and mt_pivots array assignment > > > > Makefile | 12 +- > > defs.h | 19 ++ > > maple_tree.c | 824 +++++++++++++++++++++++++++++++++++++++++++++++ > > maple_tree.h | 109 +++++++ > > maple_tree_vma.h | 34 ++ > > memory.c | 315 ++++++++++-------- > > symbols.c | 34 ++ > > xarray.h | 70 ++++ > > 8 files changed, 1285 insertions(+), 132 deletions(-) > > create mode 100644 maple_tree.c > > create mode 100644 maple_tree.h > > create mode 100644 maple_tree_vma.h > > create mode 100644 xarray.h > > -- Crash-utility mailing list Crash-utility@redhat.com https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki