[lkml]   [2018]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] mm: why vfree() do not free page table memory?
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.

Xishi Qiu

>> Thanks,
>> Xishi Qiu
> .

 \ /
  Last update: 2018-01-18 00:20    [W:0.122 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site