RE: why mprotect(PROT_SEM) ?
"Perez-Gonzalez, Inaky" <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Uwe I had a discussion about this w/ Rusty Russel, the implementor of the futex code in the kernel. Basically it boils down to: it might be needed in some architectures, so you need to put it for all of them. If I understood everything correctly, it is only needed for shared futexes [futexes between clones do not need it, just when shared across different address spaces]. It might go away in the future, maybe yes, maybe not, so we still have to keep it here. I am changing bits in the allocator [well, currently all my cycles are out for some other thing-blame Intel :)] to acomodate all this, so that at the end we can have all futexes allocated in the same page; this would take care of PTH_SEM for that page and at the same time, reduce the pinning of memory pages transparently for the library developer. I hope ... then mutexes should be able to benefit directly from it. Inaky Perez-Gonzalez -- Not speaking for Intel - opinions are my own [or my fault]