[Powertop] writeback sysfs tunable only likes one magic value

Mikko Tiihonen <mikko.tiihonen at iki.fi>
Newsgroups dev.linux.lists.powertop
Message-ID <CAOpbQOaEKEOKYyKDaXcNhTnbjUtQEQbeMM_xSnZsNQtztMva+w@mail.gmail.com>
Hi,

On one of my systems I have set dirty_writeback_centisecs to 2500. Because
it does not exactly match the powertop magic value of 1500 the powertop
reports it as a Bad value.
Would it be possible to modify the code to accept anything >= 1500 as Good?

I checked out the source code and the value seems to come from here:

In src/tuning/tuning.cpp:
add_sysfs_tunable(_("VM writeback timeout"),
"/proc/sys/vm/dirty_writeback_centisecs", "1500");

Maybe it would be possible to add an optional flag at the end to specify
the comparision function(eg.  == > >= < <=) ?

-Mikko
attachment.html (text/html, 755 B)
<div class="gmail_quote">Hi,<br><br>On
 one of my systems I have set dirty_writeback_centisecs to 2500. Because
 it does not exactly match the powertop magic value of 1500 the powertop
 reports it as a Bad value.<br>Would it be possible to modify the code to accept anything &gt;= 1500 as Good?<br>
<br>I checked out the source code and the value seems to come from here:<br><br>In src/tuning/tuning.cpp:<br>add_sysfs_tunable(_(&quot;VM writeback timeout&quot;), &quot;/proc/sys/vm/dirty_writeback_centisecs&quot;, &quot;1500&quot;);<br>


<div>
<br>Maybe it would be possible to add an optional flag at the end to specify the comparision function(eg.  == &gt; &gt;= &lt; &lt;=) ?<span><font color="#888888"><br><br>-Mikko</font></span></div>
</div><br>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.