diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-12-27 17:21:11 (GMT) |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-02-08 16:47:10 (GMT) |
commit | 806a98bdf2a862fef0fc880399d677b35ba525ff (patch) | |
tree | 5b322a48c4d22d15e8d1a6c8a6a7e28d77ce62a7 /include | |
parent | 66d06dffa5ef6f3544997440af63a91ef36a2171 (diff) | |
download | linux-806a98bdf2a862fef0fc880399d677b35ba525ff.tar.xz |
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')
0 files changed, 0 insertions, 0 deletions