From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbdHAMk6 (ORCPT ); Tue, 1 Aug 2017 08:40:58 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:9892 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbdHAMk5 (ORCPT ); Tue, 1 Aug 2017 08:40:57 -0400 Subject: Re: [PATCH v2] vmalloc: show more detail info in vmallocinfo for clarify To: Michael Ellerman , References: <1496649682-20710-1-git-send-email-xieyisheng1@huawei.com> <87o9rzsgcb.fsf@concordia.ellerman.id.au> CC: , , , , , , , , , , From: Yisheng Xie Message-ID: <6f3c8e69-b2af-d23c-b226-805faf7efd89@huawei.com> Date: Tue, 1 Aug 2017 20:36:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <87o9rzsgcb.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.598075FA.0040,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 61939f5681d9cab86b8c1ed55de76f8a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, Thanks for comment! On 2017/8/1 19:00, Michael Ellerman wrote: > Yisheng Xie 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 > > . >