[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-usability
Subject: Re: [KDE Usability] Review Request 106748: Create a taskbar notification window when we run out of i
From: "Simeon Bird" <bladud () gmail ! com>
Date: 2013-02-28 5:08:47
Message-ID: 20130228050847.1154.65487 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106748/
-----------------------------------------------------------
(Updated Feb. 28, 2013, 5:08 a.m.)
Review request for Nepomuk, KDE Usability, Sebastian Trueg, and Vishesh Handa.
Changes
-------
Use Kauth to automatically raise the inotify limit.
Description (updated)
-------
FileWatch: Use KAuth to automatically raise the inotify watch limit if
we run out of watches.
When we run out of watches, use a KAuth action to double the inotify
watch limit (by writing to /proc/sys/fs/inotify/max_user_watches).
At the same time, make the new setting persist across reboots by writing
/etc/sysctl.d/97-kde-nepomuk-filewatch-inotify.conf.
If for some reason raising the limit does not work, print a message to syslog.
==Potential issues==
1. If you don't type the prompt quickly enough, something times out and adding of \
watches is not resumed after raising the limit
2. At the moment there is no way to turn this off, except by not using nepomuk or \
denying the user the requisite kauth permissions. This is the sort of thing that \
people complain about, but I can't really see any reason to want to do that - you'd \
be running nepomuk in a "known broken" configuration, which makes no sense.
3. the action description string is "To avoid missing file changes, raise the folder \
watch limit", which could probably be improved.
4. The method of making the change persist across reboots is to write a file to \
/etc/sysctl.d, which is a bit anti-social. (note that if /etc is not writable, it \
simply does nothing). /etc/sysctl.d should work on all systemd distros, debian \
(including derivatives such as ubuntu) and gentoo.
Part of me wants to make this a separate action, but as I understand it this would \
require a second prompt and a second authorization, which would be a bit annoying. \
Also, the user's file system isn't going away - if they wanted a larger limit once, \
they almost certainly want it again, so there are limited reasons for not wanting it \
permanent. But finer grained permissions are a Good Thing, so I'm not so sure about \
this.
5. If the user has manually set the watch limit to a too-low number in sysctl.conf, \
it could potentially over-ride the file in /etc/sysctl.d, leading to the prompt \
appearing on every boot.
Also, I'd just like to mention that I was quite impressed at how easy to KAuth was to \
work with.
Diffs (updated)
-----
services/filewatch/CMakeLists.txt 501d2a1
services/filewatch/kinotify.cpp 60292a9
services/filewatch/nepomukfilewatch.cpp ca5c7d4
services/filewatch/org.kde.nepomuk.filewatch.actions PRE-CREATION
services/filewatch/raiselimit.h PRE-CREATION
services/filewatch/raiselimit.cpp PRE-CREATION
Diff: http://git.reviewboard.kde.org/r/106748/diff/
Testing (updated)
-------
Set the number of inotify watches to a low value (but not *too* low - it needs to be \
high enough to successfully watch the config files). I found 1000 to be a good value. \
> sudo sysctl fs.inotify.max_user_watches=10
Restart the filewatch service, and get a KAuth prompt.
If the watch limit needs to be raised again, no further prompts appear.
Thanks,
Simeon Bird
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/106748/">http://git.reviewboard.kde.org/r/106748/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Nepomuk, KDE Usability, Sebastian Trueg, and Vishesh \
Handa.</div> <div>By Simeon Bird.</div>
<p style="color: grey;"><i>Updated Feb. 28, 2013, 5:08 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Use Kauth to automatically raise the inotify limit.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">FileWatch: Use KAuth to automatically raise the inotify watch limit if \
we run out of watches.
When we run out of watches, use a KAuth action to double the inotify
watch limit (by writing to /proc/sys/fs/inotify/max_user_watches).
At the same time, make the new setting persist across reboots by writing
/etc/sysctl.d/97-kde-nepomuk-filewatch-inotify.conf.
If for some reason raising the limit does not work, print a message to syslog.
==Potential issues==
1. If you don't type the prompt quickly enough, something times out and adding of \
watches is not resumed after raising the limit
2. At the moment there is no way to turn this off, except by not using nepomuk or \
denying the user the requisite kauth permissions. This is the sort of thing that \
people complain about, but I can't really see any reason to want to do that - \
you'd be running nepomuk in a "known broken" configuration, which makes \
no sense.
3. the action description string is "To avoid missing file changes, raise the \
folder watch limit", which could probably be improved.
4. The method of making the change persist across reboots is to write a file to \
/etc/sysctl.d, which is a bit anti-social. (note that if /etc is not writable, it \
simply does nothing). /etc/sysctl.d should work on all systemd distros, debian \
(including derivatives such as ubuntu) and gentoo.
Part of me wants to make this a separate action, but as I understand it this would \
require a second prompt and a second authorization, which would be a bit annoying. \
Also, the user's file system isn't going away - if they wanted a larger limit \
once, they almost certainly want it again, so there are limited reasons for not \
wanting it permanent. But finer grained permissions are a Good Thing, so I'm not \
so sure about this.
5. If the user has manually set the watch limit to a too-low number in sysctl.conf, \
it could potentially over-ride the file in /etc/sysctl.d, leading to the prompt \
appearing on every boot.
Also, I'd just like to mention that I was quite impressed at how easy to KAuth \
was to work with.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Set the number of inotify watches to a low value (but not *too* low - it \
needs to be high enough to successfully watch the config files). I found 1000 to be a \
good value.
> sudo sysctl fs.inotify.max_user_watches=10
Restart the filewatch service, and get a KAuth prompt.
If the watch limit needs to be raised again, no further prompts appear.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>services/filewatch/CMakeLists.txt <span style="color: \
grey">(501d2a1)</span></li>
<li>services/filewatch/kinotify.cpp <span style="color: grey">(60292a9)</span></li>
<li>services/filewatch/nepomukfilewatch.cpp <span style="color: \
grey">(ca5c7d4)</span></li>
<li>services/filewatch/org.kde.nepomuk.filewatch.actions <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>services/filewatch/raiselimit.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>services/filewatch/raiselimit.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/106748/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic