在 2024/9/24 7:52, Andi Kleen 写道:
>> Thanks for the suggestions, I will experiment with a read-write lock,
>> meanwhile,
>> adding the documentation and testing for the lockless scheme.
>
> Read-write locks are usually not worth it for short critical sections,
> in fact they can be slower due t
> Thanks for the suggestions, I will experiment with a read-write lock,
> meanwhile,
> adding the documentation and testing for the lockless scheme.
Read-write locks are usually not worth it for short critical sections,
in fact they can be slower due to cache line effects.
> Sorry, I may not pro
在 2024/9/19 21:34, Andi Kleen 写道:
>> Sorry, I know nothing about the ThreadSanitizer and related annotation,
>> could you provide some information about it, thanks.
>
> Documentation/dev-tools/kcsan.rst
Thanks.
>
>>> Would be good to have some commentary why doing so
>>> many write operation
> Sorry, I know nothing about the ThreadSanitizer and related annotation,
> could you provide some information about it, thanks.
Documentation/dev-tools/kcsan.rst
> > Would be good to have some commentary why doing so
> > many write operations with merely a rcu_read_lock as protection is safe.
>
在 2024/9/18 20:25, Andi Kleen 写道:
> Liao Chang writes:
>> +
>> +/*
>> + * xol_recycle_insn_slot - recycle a slot from the garbage collection list.
>> + */
>> +static int xol_recycle_insn_slot(struct xol_area *area)
>> +{
>> +struct uprobe_task *utask;
>> +int slot = UINSNS_PER_PAGE;
>>
tip/perf/core
patch link:
https://lore.kernel.org/r/20240918012752.2045713-1-liaochang1%40huawei.com
patch subject: [PATCH] uprobes: Improve the usage of xol slots for better
scalability
config: arm-defconfig
(https://download.01.org/0day-ci/archive/20240918/202409182246.umkgsmxl-...@intel.
Liao Chang writes:
> +
> +/*
> + * xol_recycle_insn_slot - recycle a slot from the garbage collection list.
> + */
> +static int xol_recycle_insn_slot(struct xol_area *area)
> +{
> + struct uprobe_task *utask;
> + int slot = UINSNS_PER_PAGE;
> +
> + rcu_read_lock();
> + list_for_ea
The kprobe handler allocates xol slot from xol_area and quickly release
it in the single-step handler. The atomic operations on the xol bitmap
and slot_count lead to expensive cache line bouncing between multiple
CPUs. Given the xol slot is on the hot path for kprobe and kretprobe
handling, the pro