<table><tr><td style="">ahiemstra created this revision.<br />ahiemstra added a reviewer: Plasma.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />ahiemstra 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/D23382">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This adds a "proportional state set" value to ProcessCore::Process, that is then<br />
exposed as "Total Memory" column in KSysGuard. This column is hidden by default.</p>
<p>PSS is the amount of memory a process uses privately + the amount of shared memory<br />
divided by the amount of processes sharing that memory. It is, as far as I know, the<br />
closest we can get to "total physical memory usage" for a process.</p>
<p>The value for PSS is read from /proc/{pid}/smaps_rollup . This unfortunately means<br />
we cannot currently display PSS for processes not owned by the current user, as <br />
smaps_rollup is not world-readable.</p>
<p>For some background on this, see <a href="https://lkml.org/lkml/2017/8/9/1073" class="remarkup-link" target="_blank" rel="noreferrer">https://lkml.org/lkml/2017/8/9/1073</a> , which is the<br />
patch that adds smaps_rollup and talks about what Android uses it for.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Run ksysguard, then toggle display of the "Total Memory" column. Values should be<br />
higher than the "Memory" column.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R111 KSysguard Library</div></div></div><br /><div><strong>BRANCH</strong><div><div>pss</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23382">https://phabricator.kde.org/D23382</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>processcore/process.cpp<br />
processcore/process.h<br />
processcore/processes_linux_p.cpp<br />
processui/ProcessModel.cpp<br />
processui/ProcessModel.h<br />
processui/ksysguardprocesslist.cpp</div></div></div><br /><div><strong>To: </strong>ahiemstra, Plasma<br /><strong>Cc: </strong>plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>