Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-03-02 Thread Dave Anderson
Hi Kazuhito, The first step in the optimization of is_page_ptr() is checked in: https://github.com/crash-utility/crash/commit/d586679b861fafc99e96c863105826d30de630a7 Thanks, Dave - Original Message - > Hi Dave, > > On 2/27/2018 4:45 PM, Kazuhito Hagio wrote: > [...] > >> First,

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-03-02 Thread Dave Anderson
- Original Message - > Hi Dave, > > On 2/27/2018 4:45 PM, Kazuhito Hagio wrote: > [...] > >> First, the mem_section numbers are ascending. They may not necessarily > >> start > >> with 0, and there may be holes, but they are ascending. That being the > >> case, > >> there is no need

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-03-02 Thread Kazuhito Hagio
Hi Dave, On 2/27/2018 4:45 PM, Kazuhito Hagio wrote: [...] >> First, the mem_section numbers are ascending. They may not necessarily start >> with 0, and there may be holes, but they are ascending. That being the case, >> there is no need for is_page_ptr() to walk through NR_MEM_SECTIONS()

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-27 Thread Kazuhito Hagio
Hi Dave, I'm sorry for my long delay. On 2/23/2018 12:20 PM, Dave Anderson wrote: [...] > This "#ifdef IS_VMEMMAP_PAGE_ADDR" patch is getting really ugly. I've been > playing around with this, and this is my latest counter-proposal. Yes, I couldn't think of a way to refine it greatly.. >

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-23 Thread Dave Anderson
- Original Message - > Hi Dave, > > On 2/21/2018 4:14 PM, Dave Anderson wrote: > > > > > > - Original Message - > >> Hi Dave, > >> > >> Thank you so much for your review! > >> > >> On 2/21/2018 11:41 AM, Dave Anderson wrote: > >>> > >>> Hi Kasuhito, > >>> > >>> Just as a

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-23 Thread Kazuhito Hagio
Hi Dave, On 2/21/2018 4:14 PM, Dave Anderson wrote: > > > - Original Message - >> Hi Dave, >> >> Thank you so much for your review! >> >> On 2/21/2018 11:41 AM, Dave Anderson wrote: >>> >>> Hi Kasuhito, >>> >>> Just as a follow-up review of this part of your original patch: >>> >>>

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-21 Thread Dave Anderson
- Original Message - > Hi Dave, > > Thank you so much for your review! > > On 2/21/2018 11:41 AM, Dave Anderson wrote: > > > > Hi Kasuhito, > > > > Just as a follow-up review of this part of your original patch: > > > > +#ifdef VMEMMAP_VADDR > > + nr =

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-21 Thread Kazuhito Hagio
Hi Dave, Thank you so much for your review! On 2/21/2018 11:41 AM, Dave Anderson wrote: > > Hi Kasuhito, > > Just as a follow-up review of this part of your original patch: > > +#ifdef VMEMMAP_VADDR > + nr = nr_mem_sections; > + if (machdep->flags & VMEMMAP)

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-21 Thread Dave Anderson
Hi Kasuhito, Just as a follow-up review of this part of your original patch: +#ifdef VMEMMAP_VADDR + nr = nr_mem_sections; + if (machdep->flags & VMEMMAP) + nr = pfn_to_section_nr((addr - VMEMMAP_VADDR) / SIZE(page)); +

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-20 Thread Dave Anderson
- Original Message - > Hi Dave, > > On 2/20/2018 11:32 AM, Dave Anderson wrote: > ... > > Another suggestion/question -- if is_page_ptr() is called with a NULL > > phys > > argument (as is done most of the time), could it skip the "if > > IS_SPARSEMEM()" > > section

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-20 Thread Kazuhito Hagio
Hi Dave, On 2/20/2018 11:32 AM, Dave Anderson wrote: ... > Another suggestion/question -- if is_page_ptr() is called with a NULL > phys > argument (as is done most of the time), could it skip the "if > IS_SPARSEMEM()" > section at the top, and still utilize the part at the

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-20 Thread Dave Anderson
- Original Message - > Hi Dave, > > On 2/16/2018 4:18 PM, Dave Anderson wrote: > ... > OK, I understand your point. But what concerns me is that the > function's > purpose is to absolutely identify whether the incoming page structure > address > is a correct

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-19 Thread Kazuhito Hagio
Hi Dave, On 2/16/2018 4:18 PM, Dave Anderson wrote: ... OK, I understand your point. But what concerns me is that the function's purpose is to absolutely identify whether the incoming page structure address is a correct page structure address. But if an invalid address gets

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-16 Thread Dave Anderson
- Original Message - > Hi Dave, > > On 2/15/2018 12:38 PM, Dave Anderson wrote: > ... > Because of your questions about ppc64, possible backwards-compatibility > issues, > or potential future changes to page.flags usage, this permanent change > to the >

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-16 Thread Kazuhito Hagio
Hi Dave, On 2/15/2018 12:38 PM, Dave Anderson wrote: ... Because of your questions about ppc64, possible backwards-compatibility issues, or potential future changes to page.flags usage, this permanent change to the is_page_ptr() function solely for the purposes of

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-15 Thread Dave Anderson
- Original Message - > > > - Original Message - > > Hi Dave, > > > > Thank you for your comment! > > > > On 2/13/2018 2:33 PM, Dave Anderson wrote: > > > > > > Hi Kasuhito, > > > > > > I am planning on releasing crash-7.2.1 today, so this will have to be > > > deferred > >

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-15 Thread Dave Anderson
- Original Message - > Hi Dave, > > Thank you for your comment! > > On 2/13/2018 2:33 PM, Dave Anderson wrote: > > > > Hi Kasuhito, > > > > I am planning on releasing crash-7.2.1 today, so this will have to be > > deferred > > to 7.2.2. > > > > Because of your questions about

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-15 Thread Kazuhito Hagio
Hi Dave, Thank you for your comment! On 2/13/2018 2:33 PM, Dave Anderson wrote: > > Hi Kasuhito, > > I am planning on releasing crash-7.2.1 today, so this will have to be > deferred > to 7.2.2. > > Because of your questions about ppc64, possible backwards-compatibility > issues, > or

Re: [Crash-utility] [PATCH] Speed up "kmem -[sS]" by optimizing is_page_ptr()

2018-02-13 Thread Dave Anderson
Hi Kasuhito, I am planning on releasing crash-7.2.1 today, so this will have to be deferred to 7.2.2. Because of your questions about ppc64, possible backwards-compatibility issues, or potential future changes to page.flags usage, this permanent change to the is_page_ptr() function solely for