<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div>Right.  That makes sense. </div><div><br></div>
        
        <div id="ydp748dd32byahoo_quoted_2569988630" class="ydp748dd32byahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, July 16, 2018, 7:27:18 PM PDT, valdis.kletnieks@vt.edu <valdis.kletnieks@vt.edu> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">On Tue, 17 Jul 2018 02:15:17 -0000, David Frank said:<div class="ydp748dd32byqt2069756343" id="ydp748dd32byqtfd59193"><br clear="none"><br clear="none">> inking. I'm checking out if the flag does what is is said to do-- I don't have <br clear="none">> to call msync function, which would boost performance.</div><br clear="none"><br clear="none">Note that this can actually *kill* performance, because this means that the<br clear="none">kernel has to flush to backing store every single time it notes a change,<br clear="none">whereas if you use msync only at those points your software needs a sync point,<br clear="none">it can do it at only those points....<br clear="none"><br clear="none">Thought experiment:  Imagine a workflow that needs to checkpoint every 1000<br clear="none">changes to the shared segment (for instance, if you've mapped an array with<br clear="none">1000 rows, do a for() loop across it incrementing one item, and checkpoint when<br clear="none">they're all incremented).  msync after the loop completes is one sync, while a worst-case<br clear="none">using MAP_SYNC could result in a flush after every single increment (if the system<br clear="none">is rescheduling the process over and over - for instance, if there's also another<br clear="none">syscall inside the loop).<div class="ydp748dd32byqt2069756343" id="ydp748dd32byqtfd55764"><br clear="none"></div></div><div class="ydp748dd32byqt2069756343" id="ydp748dd32byqtfd62807">_______________________________________________<br clear="none">Kernelnewbies mailing list<br clear="none"><a shape="rect" href="mailto:Kernelnewbies@kernelnewbies.org" rel="nofollow" target="_blank">Kernelnewbies@kernelnewbies.org</a><br clear="none"><a shape="rect" href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="nofollow" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br clear="none"></div></div>
            </div>
        </div></div></div></body></html>