diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-12-27 18:21:11 +0100 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-02-08 17:47:10 +0100 |
commit | 806a98bdf2a862fef0fc880399d677b35ba525ff (patch) | |
tree | 5b322a48c4d22d15e8d1a6c8a6a7e28d77ce62a7 /include/linux/uprobes.h | |
parent | uprobes: Kill uprobes_mutex[], separate alloc_uprobe() and __uprobe_register() (diff) | |
download | linux-dev-806a98bdf2a862fef0fc880399d677b35ba525ff.tar.xz linux-dev-806a98bdf2a862fef0fc880399d677b35ba525ff.zip |
uprobes: Rationalize the usage of filter_chain()
filter_chain() was added into install_breakpoint/remove_breakpoint to
simplify the initial changes but this is sub-optimal.
This patch shifts the callsite to the callers, register_for_each_vma()
and uprobe_mmap(). This way:
- It will be easier to add the new arguments. This is the main reason,
we can do more optimizations later.
- register_for_each_vma(is_register => true) can be optimized, we only
need to consult the new consumer. The previous consumers were already
asked when they called uprobe_register().
This patch also moves the MMF_HAS_UPROBES check from remove_breakpoint(),
this allows to avoid the potentionally costly filter_chain(). Note that
register_for_each_vma(is_register => false) doesn't really need to take
->consumer_rwsem, but I don't think it makes sense to optimize this and
introduce filter_chain_lockless().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/uprobes.h')
0 files changed, 0 insertions, 0 deletions