[lkml]   [2019]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 2/2] vmalloc: Remove work as from vfree path
On Mon, May 20, 2019 at 4:39 PM Rick Edgecombe
<> wrote:
> From: Rick Edgecombe <>
> Calling vm_unmap_alias() in vm_remove_mappings() could potentially be a
> lot of work to do on a free operation. Simply flushing the TLB instead of
> the whole vm_unmap_alias() operation makes the frees faster and pushes
> the heavy work to happen on allocation where it would be more expected.
> In addition to the extra work, vm_unmap_alias() takes some locks including
> a long hold of vmap_purge_lock, which will make all other
> VM_FLUSH_RESET_PERMS vfrees wait while the purge operation happens.
> Lastly, page_address() can involve locking and lookups on some
> configurations, so skip calling this by exiting out early when

Hmm. I would have expected that the major cost of vm_unmap_aliases()
would be the flush, and at least informing the code that the flush
happened seems valuable. So would guess that this patch is actually a
loss in throughput.


 \ /
  Last update: 2019-05-21 18:18    [W:0.068 / U:10.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site