Messages in this thread | | | Date | Sat, 2 Jun 2012 20:21:58 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 1/3] uprobes: install_breakpoint() should fail if is_swbp_insn() == T |
| |
On 06/01, Oleg Nesterov wrote: > > while (more--) { > info = kmalloc(sizeof(struct map_info), GFP_KERNEL); > if (!info) { > curr = ERR_PTR(-ENOMEM); > goto out; > } > info->next = prev; > prev = info; > }
This should be "do ... while (--more)", otherwise it seems to work and really helps.
I did the simple test under qemu. Currently uprobe_register() hangs "forever" if the probed addr has 10000 mappings, I'have stopped qemu after several minutes.
With the new code uprobe_register() needs 0.403s to complete.
We can also change build_map_info() to try GFP_NOWAIT | GFP_NOMEMALLOC under i_mmap_mutex first, not sure this is really needed.
I'll write the changelog and send the patch...
Do you see any problems with this approach?
Oleg.
| |