linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yisheng Xie <xieyisheng1@huawei.com>
To: Michael Ellerman <mpe@ellerman.id.au>, akpm@linux-foundation.org
Cc: mhocko@suse.com, zijun_hu@htc.com, mingo@kernel.org,
	thgarnie@google.com, kirill.shutemov@linux.intel.com,
	aryabinin@virtuozzo.com, chris@chris-wilson.co.uk,
	tim.c.chen@linux.intel.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, guohanjun@huawei.com
Subject: Re: [PATCH v2] vmalloc: show more detail info in vmallocinfo for clarify
Date: Tue, 1 Aug 2017 20:36:47 +0800	[thread overview]
Message-ID: <6f3c8e69-b2af-d23c-b226-805faf7efd89@huawei.com> (raw)
In-Reply-To: <87o9rzsgcb.fsf@concordia.ellerman.id.au>

Hi Michael,

Thanks for comment!
On 2017/8/1 19:00, Michael Ellerman wrote:
> Yisheng Xie <xieyisheng1@huawei.com> writes:
> 
>> When ioremap a 67112960 bytes vm_area with the vmallocinfo:
>>  [..]
>>  0xec79b000-0xec7fa000  389120 ftl_add_mtd+0x4d0/0x754 pages=94 vmalloc
>>  0xec800000-0xecbe1000 4067328 kbox_proc_mem_write+0x104/0x1c4 phys=8b520000 ioremap
>>
>> we get the result:
>>  0xf1000000-0xf5001000 67112960 devm_ioremap+0x38/0x7c phys=40000000 ioremap
>>
>> For the align for ioremap must be less than '1 << IOREMAP_MAX_ORDER':
>> 	if (flags & VM_IOREMAP)
>> 		align = 1ul << clamp_t(int, get_count_order_long(size),
>> 			PAGE_SHIFT, IOREMAP_MAX_ORDER);
>>
>> So it makes idiot like me a litter puzzle why jump the vm_area from
>> 0xec800000-0xecbe1000 to 0xf1000000-0xf5001000, and leave
>> 0xed000000-0xf1000000 as a big hole.
>>
>> This is to show all of vm_area, including which is freeing but still in
>> vmap_area_list, to make it more clear about why we will get
>> 0xf1000000-0xf5001000 int the above case. And we will get the
>> vmallocinfo like:
>>  [..]
>>  0xec79b000-0xec7fa000  389120 ftl_add_mtd+0x4d0/0x754 pages=94 vmalloc
>>  0xec800000-0xecbe1000 4067328 kbox_proc_mem_write+0x104/0x1c4 phys=8b520000 ioremap
>>  [..]
>>  0xece7c000-0xece7e000    8192 unpurged vm_area
>>  0xece7e000-0xece83000   20480 vm_map_ram
>>  0xf0099000-0xf00aa000   69632 vm_map_ram
> 
> My vmallocinfo is full of these unpurged areas, should I be worried?

The unpurged areas is a lazy free vm area, which maybe free at anytime. e.g. if the
nr_lazy(count in pages) is bigger than lazy_max_pages(), these area will be purged
and free.

So I think you do not have worried about it.

Thanks
Yisheng Xie

> 
> # grep -c "unpurged" /proc/vmallocinfo 
> 311
> 
> cheers
> 
> .
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-08-01 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  8:01 Yisheng Xie
2017-06-05 22:17 ` Andrew Morton
2017-08-01 11:00 ` Michael Ellerman
2017-08-01 12:36   ` Yisheng Xie [this message]

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=6f3c8e69-b2af-d23c-b226-805faf7efd89@huawei.com \
    --to=xieyisheng1@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=guohanjun@huawei.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=thgarnie@google.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=zijun_hu@htc.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