From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbeAQJt0 (ORCPT + 1 other); Wed, 17 Jan 2018 04:49:26 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:4236 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752268AbeAQJtU (ORCPT ); Wed, 17 Jan 2018 04:49:20 -0500 Message-ID: <5A5F1C09.9040000@huawei.com> Date: Wed, 17 Jan 2018 17:48:57 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Vlastimil Babka CC: Michal Hocko , Mel Gorman , LKML , Linux MM , "Wujiangtao (A)" Subject: Re: [RFC] mm: why vfree() do not free page table memory? References: <5A4603AB.8060809@huawei.com> <0ffd113e-84da-bd49-2b63-3d27d2702580@suse.cz> In-Reply-To: <0ffd113e-84da-bd49-2b63-3d27d2702580@suse.cz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 2018/1/17 17:16, Vlastimil Babka wrote: > On 12/29/2017 09:58 AM, Xishi Qiu wrote: >> When calling vfree(), it calls unmap_vmap_area() to clear page table, >> but do not free the memory of page table, why? just for performance? > > I guess it's expected that the free virtual range and associated page > tables it might be reused later. > Hi Vlastimil, If use vmalloc/vfree different size, then there will be some hols during VMALLOC_START to VMALLOC_END, and this holes takes page table memory, right? >> If a driver use vmalloc() and vfree() frequently, we will lost much >> page table memory, maybe oom later. > > If it's reused, then not really. > > Did you notice an actual issue, or is this just theoretical concern. > Yes, we have this problem on our production line. I find the page table memory takes 200-300M. Thanks, Xishi Qiu >> Thanks, >> Xishi Qiu >> > > > . >