<table><tr><td style="">jakobkummerow created this revision.<br />jakobkummerow added a reviewer: davidedmundson.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />jakobkummerow requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27362">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Getting CPU information starts with reading /proc/cpuinfo into a buffer; if that buffer is too small, then no information will be returned at all (updateCpuInfo() will return -1, so initCpuInfo() will return early); the consequence is that ksysguardd/ksysguard/plasmaengineexplorer won't know about "system/cores" or "cpu/system/AverageClock"; that in turn will make the "System Load Viewer" plasmoid completely dysfunctional (it won't show *any* data) because it relies on "system/cores" being available.</p>
<p>The buffer is currently 32KB large, which is not enough on modern hardware. This patch bumps it to 256K, in order to accommodate current hardware and be future-proof for a few years.</p>
<p>I can provide two specific data points, measured with <tt style="background: #ebebeb; font-size: 13px;">cat /proc/cpuinfo | wc -c</tt>:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">on a 12C24T AMD machine: ~36K</li>
<li class="remarkup-list-item">on a 36C72T Intel machine: ~102K</li>
</ul>
<p>Extrapolating, I estimate that the biggest CPUs available today (Ryzen 3990, 64C128T) will need ~192K (but I don't have one of those available to test on).</p>
<p>I've verified locally that this patch fixes the issue: the System Log Viewer plasmoid shows data as expected afterwards.</p>
<p>Ref: <a href="https://bugs.kde.org/show_bug.cgi?id=384515" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=384515</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R106 KSysguard</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27362">https://phabricator.kde.org/D27362</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>ksysguardd/Linux/cpuinfo.c</div></div></div><br /><div><strong>To: </strong>jakobkummerow, davidedmundson<br /><strong>Cc: </strong>plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>