[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node
> You could have been migrated to another CPU while
> memory has been allocated.
That is true that we can migrate since we allow preemption
when allocate. But it does not really matter on which CPU an
allocation occurs and whether we migrate or not.

If we land on another CPU or still stay on the same, we will
check anyway one more time if it(another/same CPU) is preloaded
or not:

if (__this_cpu_cmpxchg(ne_fit_preload_node, NULL, pva)

if another, we can free the object allocated on previous step if
it already has it. If another CPU does not have it, save it in
ne_fit_preload_node for another current CPU to reuse later. Further
we can not migrate because of:


Vlad Rezki

 \ /
  Last update: 2019-10-04 19:05    [W:0.123 / U:3.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site