Re: [PATCH] uprobes: Improve the usage of xol slots for better scalability

2024-09-23 Thread 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 to cache line effects. > Sorry, I may not pro

Re: [PATCH] uprobes: Improve the usage of xol slots for better scalability

2024-09-19 Thread 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 > > Would be good to have some commentary why doing so > > many write operations with merely a rcu_read_lock as protection is safe. >

Re: [PATCH] uprobes: Improve the usage of xol slots for better scalability

2024-09-18 Thread 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; > + > + rcu_read_lock(); > + list_for_ea