Re: [Interest] dynamic library question
On 17 March 2014 23:21, Thiago Macieira thiago.macie...@intel.com wrote: However, if KSP is enabled, the kernel might realise the pages are identical and drop one copy. I would recommend you don't depend on it, so simply don't duplicate the files. Doesn't KSP scan only the pages that have been explictly marked as mergeable via madvise? Why would the dynamic linker use such flag on the libraries it maps into memory? (It would be pointless in the vast majority of the cases except in OP's scenario?) Cheers, -- Giuseppe D'Angelo ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] dynamic library question
However, if KSP is enabled, the kernel might realise the pages are identical and drop one copy. I would recommend you don't depend on it, so simply don't duplicate the files. Doesn't KSP scan only the pages that have been explictly marked as mergeable via madvise? Why would the dynamic linker use such flag on the libraries it maps into memory? (It would be pointless in the vast majority of the cases except in OP's scenario?) Just to be clear, you guys are talking about KSM (kernel samepage merging) right? -mandeep ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] dynamic library question
On 18 March 2014 11:28, Mandeep Sandhu mandeepsandhu@gmail.com wrote: Just to be clear, you guys are talking about KSM (kernel samepage merging) right? Uhm, yes, I was. I failed the acronym... Cheers, -- Giuseppe D'Angelo ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] dynamic library question
Em ter 18 mar 2014, às 15:58:46, Mandeep Sandhu escreveu: However, if KSP is enabled, the kernel might realise the pages are identical and drop one copy. I would recommend you don't depend on it, so simply don't duplicate the files. Doesn't KSP scan only the pages that have been explictly marked as mergeable via madvise? Why would the dynamic linker use such flag on the libraries it maps into memory? (It would be pointless in the vast majority of the cases except in OP's scenario?) Just to be clear, you guys are talking about KSM (kernel samepage merging) right? Sorry, yes, KSM. I got the acronym wrong. And I'm also not sure that the read-only pages are marked mergeable with madvise. It's quite likely that they aren't because it's not likely to produce any non-negligible results in the common case. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] dynamic library question
Hi, A general question but maybe you are so kind and help me :-) /usr/lib/libMyLib.so and /opt/MyProj/lib/libMyLib.so (100% indentical files) So when I have 2 programs: one uses the one and the other, the other lib, will they still share memory? Thanks in advance! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] dynamic library question
Em seg 17 mar 2014, às 21:27:00, Damian Ivanov escreveu: Hi, A general question but maybe you are so kind and help me :-) /usr/lib/libMyLib.so and /opt/MyProj/lib/libMyLib.so (100% indentical files) So when I have 2 programs: one uses the one and the other, the other lib, will they still share memory? That depends on the operating system in question. Linux, in general, will not share the pages if they don't come from the exact same file. However, if KSP is enabled, the kernel might realise the pages are identical and drop one copy. I would recommend you don't depend on it, so simply don't duplicate the files. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest