girfan | 3 months ago | on: Virtualizing Nvidia HGX B200 GPUs with Open Source
girfan's comments
girfan | 4 months ago | on: Marble: A Multimodal World Model
girfan | 2 years ago | on: Teddit – An alternative Reddit front-end focused on privacy
girfan | 2 years ago | on: Had a call with Reddit to discuss pricing
girfan | 3 years ago | on: Faster CPython 3.12 Plan
There are a few cases where `dlmopen` has issues, for example, some libraries are written with the assumption that there will only be one of them in the process (their use of globals/thread local variables etc.) which may result in conflicts across namespaces.
Specifically, `libpthread` has one such issue [1] where `pthread_key_create` will create duplicate keys in separate namespaces. But these keys are later used to index into `THREAD_SELF->specific_1stblock` which is shared between all namespaces, which can cause all sorts of weird issues.
There is a (relatively old, unmerged) patch to glibc where you can specify some libraries to be shared across namespaces [2].
[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=24776#c13
[2]: https://patchwork.ozlabs.org/project/glibc/patch/20211010163...
girfan | 3 years ago | on: Faster CPython 3.12 Plan
girfan | 3 years ago | on: Faster CPython 3.12 Plan
I believe you can do that with `dlmopen` in separate link maps. I have worked with multiple completely isolated Python interpreters in the same process that do not share a GIL using that approach.
girfan | 3 years ago | on: How to choose the right Python concurrency API
I have also been working on running multiple Python interpreters in the same process by isolating them in different namespaces using `dlmopen` [1]. The objective on a high level is to receive requests for some compute intensive operations from a TCP/HTTP server and dispatch them on to different workers. In this case, a thin C++ shim receives the requests and dispatches them on to one of the Python interpreters in a namespace. This eliminates contention for the GIL amongst the interpreters and can exploit parallelism by running each interpreter on a different set of cores. The data obtained from the request does not need to be copied into the interpreter because everything is in the same address space; similarly the output produced by the Python interpreter is also just passed back without any copies to the server.
[1] https://www.man7.org/linux/man-pages/man3/dlmopen.3.html
girfan | 3 years ago | on: New CRISPR-based map ties every human gene to its function
girfan | 3 years ago | on: Dragonflydb – A modern replacement for Redis and Memcached
girfan | 5 years ago | on: Launch HN: Seed (YC W21) – A Fully-Managed CI/CD Pipeline for Serverless
girfan | 6 years ago | on: Ask HN: How do you learn complex, dense technical information?
https://web.stanford.edu/class/ee384m/Handouts/HowtoReadPape...
girfan | 6 years ago | on: Four Years in Startups
girfan | 6 years ago | on: “China's Tesla” NIO slashes thousands of jobs as losses mount
girfan | 6 years ago | on: Ask HN: What advice would you give to a computer science undergraduate?
girfan | 9 years ago | on: Practical Deep Learning for Coders
girfan | 9 years ago | on: Open Letter to Tim Cook
girfan | 10 years ago | on: Show HN: Txtter – A messaging app making it easy to share photos with friends
girfan | 10 years ago | on: Daakia – POP Server mail backup tool
girfan | 10 years ago | on: Apple September 2015 Keynote