<p>laforge <strong>uploaded patch set #8</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20317">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">logging: Attempt a synchronous, non-blocking write first (file, stderr)<br><br>In the old days, we performed synchronous, blocking writes to the log<br>file or stderr.  This was replaced by code that turned all log<br>file/stderr writes into non-blocking writes behind a write_queue.<br><br>This patch now introduces a further optimization: If we currently<br>don't have any log messages pending in the write queue, we are not<br>back-logged and assume we have a fair chance of writing the log message<br>right now, synchronously.  So we try that first, and only enqueue<br>the log message if the write fails (no bytes or insufficient number<br>of bytes written).<br><br>This way we should get the best of both worlds: No delay/re-ordering<br>(and lower select syscall load) for the "normal" case (benefits of<br>the old synchronous writes) while at the same time never risking to<br>block on log output.<br><br>Related: OS#4311<br>Change-Id: I08469a7e4be9bc5bbd39140457bb582f4a0b1703<br>---<br>M src/logging.c<br>1 file changed, 30 insertions(+), 17 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/20317/8</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/20317">change 20317</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/20317"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I08469a7e4be9bc5bbd39140457bb582f4a0b1703 </div>
<div style="display:none"> Gerrit-Change-Number: 20317 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>