Re: Performance of l4_task_unmap call
Adam Lackorzynski <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Tue Apr 24, 2012 at 16:36:52 -0800, Chen Tian wrote: > I did a small test: a parent task first maps and then unmaps a page to its > child. Both parent and child task are running on the same core. > > I found the execution is very slow and 99% time are spent on l4_task_unmap( > L4_FP_OTHER_SPACES flag is used). > > After some investigation, I found the flag "need_xcpu_tlb_flush" in > map_util.cpp:766 is set to true. My guess is that this flag controls the > tlb of the cpu at which the child task is running. However, in my case, > both tasks are running on the same core, setting this flag can have huge > negative impact on performance. > > I am thinking to put a check before this statement: if (current_cpu() != > space's CPU) set the flag to true. Is this correct? If so, how to get > space's cpu? > space->cpu() ? This is a valid optimization, however, only if it is made sure that no code of that task has ever run on any other core. A space has no CPU because a space does not execute anything. Adam -- Adam [email protected] Lackorzynski http://os.inf.tu-dresden.de/~adam/