Re: [RFC PATCH] getcpu_cache system call: caching current CPU number (x86)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- On Jul 17, 2015, at 6:43 PM, Ondřej Bílka neleai@xxxxxxxxx wrote:

> On Fri, Jul 17, 2015 at 04:03:30PM +0000, Mathieu Desnoyers wrote:
>> ----- On Jul 17, 2015, at 6:58 AM, Ondřej Bílka neleai@xxxxxxxxx wrote:
>> [...]
>> >> If we invoke this per-thread registration directly in the glibc NPTL
>> >> implementation,
>> >> in start_thread, do you think it would fit your requirements ?
>> >>
>
[...]
>> > Second would be write patch to libc adding function
>> > pthread_create_add_hook_np to register function that would be ran after
>> > each thread creation.
>> 
>> Do you suggest that this callback should be registered once per thread,
>> or somehow attached to pthread_attr_t ? As maintainer of lttng-ust,
>> where we need some control over our own threads, but where we want minimal
>> impact on the overall application, I would really prefer if we can attach
>> the callback to pthread_attr_t.
>> 
> Could you elaborate. I was suggesting per-thread callback, what do you
> want to do with pthread_attr_t?

Hrm, nevermind, even in the context of lttng-ust, I'd want the callback to
be called for every thread in the application. Therefore, registering this
callback once per process seems to make sense.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux