This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlopen and memory order guarantees with threads


On Sun, Mar 4, 2012 at 2:56 AM, edA-qa mort-ora-y <eda-qa@disemia.com> wrote:
> On 03/04/2012 08:30 AM, edA-qa mort-ora-y wrote:
>> I might have to go tracking through the linux kernel code now to see
>> what happens. What if the guarantee isn't actually there and we're all
>> just getting lucky? ?For example, on x86 we know we don't have this
>
> I'll just reply to myself here. I'm reading the kernel docs, and
> "cachetlb.txt" in particular (as you mentioned this, perhaps not the
> doc, but the topic).
>
> It is clear there are all sorts of functions for managing the MMU to
> make the dlopen safe, so while not explicit that mmap uses them, it
> would be really silly of it not to.
>
> But overall I have to keep in mind then that dlopen is probably one of
> the most expensive function calls one can make. Indeed it looks like it
> could impact any thread whether it wants to use that loaded library or not.

Correct.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]