/
ChangeLog
469 lines (434 loc) · 19.6 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
0.5.0+exp0.6.0-pre1 / 2012-01-04
==================
This is fork of original https://github.com/poelzi/ulatencyd, which seems
to be inactive for last 6 month. This fork introduce many bugfixes and new
features and I want to release it as 0.5.0+exp0.6.0 version once release bugs
get fixed.
[ Open release bugs ]
* one_seat_desktop scheduler mappings:
- thaw frozen applications whenever X session manager is going to shutdown/save
related session
[ Summary ]
* new experimental scheduler mappings "one_seat_desktop"
* removed embedded libproc and coreutils, statically linked against system
libproc
* a lot updated simple rules
* io.rule turns NCQ (IOPS) mode on block devices under load
* doxygen documentation
* make U_PROC extensible in LUA
* CGROUPS handling changes
- don't touch foreign cgroups!
- store own cgroups in ulatencyd private cgroup hierarchies
- clean unused cgroups via DBUS
- new cgroups release agent script (passes request to scheduler via dbus)
- clean cgroups on exit
- remove cgroups left behind the previous ulatencyd instance
- reimplement u_proc.cgroup* stuff in the C core
* support for process isolation (Isolate filter, via isolate flag)
* add flexibility to scheduler mappings
- sysflags prefilter
- mulitple checks functions
- the rule may be skipped till end of current scheduler run
- multiple adjusts function
- adjust functions to be run only once per scheduler run
- ulatency.match_flag()
- scheduler:register_after_hook()
- string:rtrim()
- fix CGroup:get_value()
- ulatency.is_pid_alive(pid)
* system "startup" flag set until first iteration finished
* commit a new cgroup settings prior any process is added
* tasks reimplemented (now stored in the hash table, persistent across
iterations and usable/extensible in LUA)
* netlink_fallback module, used if kernel is not compiled with PROC_EVENTS
* delay queue related fixes and optimizations
* u_proc_ensure() optimizations
- it is now possible to update property once per scheduler run
* improve signal handling (quit, suspend)
* fix linux signal handling to be async safe
* logging enhancements
* sessions
+ disable xwatch polling and clear the active pids lists of users with no
active session
+ on session change run full iteration and make sure it is run before next
xwatch poll
* ulatency client:
- fix sysflags command
- ulatency clear <cgroup>|ALL
+ try to thaw frozen groups
+ does not clear cgroups not created by ulatencyd
+ clear ulatencyd private hierarchies too
+ keep ulatencyd private hierarchy and real hierarchy with cgroup
controller synced
- ulatency mounts: add column with ulatencyd private hierarchies
- new command "clear-empty": clears all empty cgroups created by ulatencyd.
* configuration changes for ulatencyd.conf:
- raise default io.threshold from 500 to 3000, 500 was IMHO too low
* configuration changes for cgroups.conf:
- add memory.move_charge_at_immigrate'] = 1 to memory subsys defaults.
- remove broken support for complex cgroups hierarchies and mount points,
only the most usual scenario with each cgroup subsystem mounted
under separate hierarchy under CGROUP_ROOT/<subsystem> is supported.
* sample logrotate file (scripts/logrotate)
* sample sysv-rc init file (scripts/service/sysv-rc/)
* restore sched_autogroup in linux kernel on shutdown
* set umask to 022 instead of 0
* don't die when cgroup subsystem cannot be mounted, just print warning
One subsystem and ulatencyd running should be better than no ulatencyd :)
* fixed a lot of memory leaks
* handle cgroups removed outside ulatencyd (issue #28)
* fix blkio.weight
* fix merge_config pre rules handling (scheduler/00-common)
* fix io priority for user.media (to real-time)
* default scheduler fixes (desktop.lua)
* fix the out of source directory build
[ Details ]
* new experimental scheduler mappings "one_seat_desktop"
Advanced scheduler for one seat desktop, processes under inactive sessions
are scheduled with idle priority or even frozen. You may try to enable the
`freezer` cgroup subsystem in cgroups.conf. This scheduler mapping is not
used by default, as is not fully mater, though I am using it.
- responding to active session change
- inactive session processes have idle priority, swappiness 100, soft
memory limit 0 etc.
- useless processes (flagged with inactive_user.useless, user.media, user.ui,
user.games, user.idle, daemon.idle) may be frozen, though freezer
subsystem is disabled by default (see cgroups.conf).
- boost for starting applications (flagged application.starting), see
scripts/update-user-apps.sh, scripts/cron.daily/99ulatencyd, generated
conf/simple.d/applications.conf
- if starting app is the top most active process at same time, it is
iosched with real-time policy
- sets memory.move_charge_at_immigrate = 3 for system essential cgroup
- BUGS with freezer cgroup subsystem enabled:
+ requires console-kit
+ If multiple users are logged in, you must quit ulatencyd daemon
before shutting the system down. Otherwise other users applications
may remain frozen and will not get chance to shutdown properly.
Possible solution: We need to be informed by session manager.
Possible workarounds: quit ulatencyd before shutdown, or disable
freezer subsystem in cgroups.conf.
+ Processes are not correctly assigned to user sessions (ulatencyd
check processes UIDs, not the value of XDG_SESSION_COOKIE variable
in a process environment).
If you sudo to root or other user, processeses you
run will be considered for members of that user session you have
sudo to. Processes with EUID 0 are not scheduled by the mappings,
so if you sudo to root, you only loss some boosts for application
executed under sudo. But if you sudo to other user, spawn processes
may get even frozen!
* removed embedded libproc and coreutils, statically linked against system
libprocps (issue #37). Static libprocps must be installed on the system
because libprocps does not export enough symbols, and this won't probably
changed in the near future. On Debian systems the static lib is provided by
libprocps0-dev package.
* a lot updated simple rules
* io.rule turns NCQ (IOPS) mode on block devices under load
* doxygen documentation
* make U_PROC extensible in LUA
* CGROUPS handling changes
* don't touch foreign cgroups!
- Detect and handle foreign cgroups using ulatencyd private cgroup hierarchies.
- scheduler skips processes in cgroups created outside ulatencyd
* clean unused cgroups via DBUS
- org.quamquam.ulatencyd.System.cgroupsCleanup method
- new cgroups release agent script (passes request to scheduler via dbus)
* clean cgroups on exit
- cleanup rules (99-cleanup.lua)
- facility to quit the daemon with scheduler cleanup (including cgroups
removal). Scheduler quits when 'suspend' or 'quit' (this is with cgroups
cleanup) system flag set. Flags are set in signal handlers or manually
(ulatency.quit() in LUA rules).
* remove cgroups left behind the previous ulatencyd instance
* reimplement u_proc.cgroup* stuff in the C core
+ U_PROC:get_cgroup(subsys)
+ U_PROC:set_cgroup(subsys, cgroup_path)
+ U_PROC.cgroup => u_proc.cgroup (GHashTable)
+ U_PROC.cgroup_raw => u_proc.cgroup_raw (char **)
+ U_PROC.cgroup_origin => u_proc.cgroup_origin (GHashTable)
+ U_PROC.cgroup_origin_raw => u_proc.cgroup_origin (char **)
+ u_proc_ensure(proc, CGROUP, ...)
* support for process isolation (Isolate filter, via isolate flag)
- see simple.d/isolate.conf, rules/zz_isolate.lua
- The isolate flag marks processes that should be isolated in
some way. Threshold and reason values defines how: If threshold is not
set or is set to value lower than 1, the process will be normally
scheduled. Scheduler rules will be responsible for isolating it (or not).
If threshold is set to value 1 or greater, process will be handled by
Isolate filter in zz_isolate.lua rule:
+ threshold = 1 - Not scheduled but cleaned up before ulatencyd exits
(e.g. moved to root cgroup)
+ threshold >= 2 - Not scheduled and not cleaned up before ulatencyd
exists.
+ reason="" or not set - No isolation cgroup will be created, process
will stay in its origin cgroup.
+ reason="<reason>" Process will be moved to /iso_<reason> cgroup of
each subsystem defined in cgroups.conf. CGroup parameters may be defined
in Isolate filter (zz_isolate.lua).
- cgroups (and processes in them) created outside ulatencyd are never
touched (i.e. libvirt)
* add flexibility to scheduler mappings
- sysflags prefilter
- mulitple checks functions
- the rule may be skipped till end of current scheduler run
- multiple adjusts function
- adjust functions to be run only once per scheduler run
- ulatency.match_flag()
- scheduler:register_after_hook()
+ Register function to be run after the scheduling of process(es) is
finished.
- string:rtrim()
- fix CGroup:get_value()
- ulatency.is_pid_alive(pid)
+ Check `/proc` subsystem and return TRUE if process/task with `pid`
exists.
* system "startup" flag set until first iteration finished
* other scheduler changes
- commit a new cgroup settings prior any process is added (or adjust_new
called): This is necessary to memory.move_charge_at_immigrate has effect.
Without moving charges, setting the memory limits for poisonous processes is
nearly useless.
* tasks are now stored in the hash table and usable in LUA
- tasks can be used in lua without caughting SIGSEGV (because reference
counting now implemented)
- tasks are persistent across iterations
- tasks may be valid / invalid
- tasks pushed to lua as U_TASK "type", available fields:
+ U_TASK.is_valid
+ U_TASK.is_invalid
+ U_TASK.data
+ U_TASK.tid
+ U_TASK.proc_pid
(if U_TASK.is_valid:)
+ U_TASK.proc
+ all proc_t fields (ppid,tgid,euid, etc.)
- U_TASK table is extensible via lu
- u_task *task_by_tid(pid_t tid), ulatency.get_tid(tid) from LUA
- ulatency.get_pid(pid,include_tasks) has optional `include_tasks`
parameter. If TRUE and u_proc with `pid` not found, test if task
with `pid` exists and return its thread leader u_proc.
* netlink_fallback module, used if kernel is not compiled
with PROC_EVENTS
* delay queue related fixes and optimizations:
- fix normal filters were not been run on processes leaving the delay
queue prematurely because changed by fast filters.
- fix processes doing exec leave delay stack even if not affected by fast
filters
- make sure processes leaving delay stack are updated
- optimize parent_proc_by_pid() and update_processes_run() a bit
- optimize u_proc_ensure, parse process cgroups only when needed
+ The property to ensure could be either updated or not. Now you have
three options
- NOUPDATE - update only if property not parsed
- UPDATE_NOW - always update
- UPDATE_ONCE - update if was not updated since current iteration
start
- scheduler skips already dead processes
* fix linux signal handling
All signals are now handled in async safe way to avoid crashes
(e.g g_log recursions)
* logging enhancements:
- prepend times to log messages
- improve reporting of cgroup/sysfs filesystem write errors
- better log messages on daemon start
- lower the log level in proc:set_block_scheduler() to debug
- suppress warning if the task that can't be added to cgroup is already
dead
- log only block devices which parameters were really changed, prevent
useless logging for e.g. loopbacks
- more minor changes
* sessions
+ disable xwatch polling and clear the active pids lists of users with no
active session
+ on session change make sure full iteration is run before next xwatch
poll, if we allow xwatch poll on server running some frozen application it
may lock.
* ulatency client:
- fix sysflags command
- ulatency clear <cgroup>|ALL
+ try to thaw frozen groups
+ does not clear cgroups not created by ulatencyd
+ clear ulatencyd private hierarchies too
+ keep ulatencyd private hierarchy and real hierarchy with cgroup
controller synced.
- ulatency mounts
+ add column with ulatencyd private hierarchies
- new command "clear-empty"
+ Clears all empty cgroups created by ulatencyd.
+ This is like calling org.quamquam.ulatencyd.System.cgroupsCleanup dbus
method, except it work even if ulatencyd not running.
* configuration changes for ulatencyd.conf:
- raise default io.threshold from 500 to 3000, 500 was IMHO too low
* configuration changes for cgroups.conf:
- add memory.move_charge_at_immigrate'] = 1 to memory subsys defaults.
Moving memory charges along with processes is necessary to handling
poisonous processes. Without this it is nearly useless.
- remove broken support for complex cgroups hierarchies and mount points
ulatencyd now supports only the most usual scenario, where each cgroup
subsystem is mounted under separate hierarchy under
CGROUP_ROOT/<subsystem>. CGROUP_MOUNTPOINTS option was replaced with
CGROUP_SUBSYSTEMS - simple array of enabled subsystems.
CGROUP_MOUNTPOINTS table was misleading: mount points different from
cgroup subsystem names and hierarchies with multiple subsystems weren't
correctly handled. It was silently supposed that each subsystem is
mounted under separate hierarchy under the directory with the name of
cgroup subsystem. Hierarchy mount points, cgroup subsystem names and
scheduler mapping keys were used interchanging.
* sample logrotate file (scripts/logrotate)
* sample sysv-rc init file (scripts/service/sysv-rc/)
- probably containing Debian specific code
[ OTHER CHANGES ]
* restore sched_autogroup in linux kernel on shutdown
* set umask to 022 instead of 0
* don't die when cgroup subsystem cannot be mounted, just print warning
One subsystem and ulatencyd running should be better than no ulatencyd :)
* fixed a lot of memory leaks
* handle cgroups removed outside ulatencyd (issue #28)
* fix blkio.weight
* fix merge_config pre rules handling (scheduler/00-common)
- Pre rules used to be overwritten by template rules.
* fix io priority for user.media (to real-time)
* default scheduler fixes (desktop.lua)
- fix kernel threads detection
* fix the out of source directory build
0.5.0 / 2011-04-05
==================
* bump version
* fix single task config
* hide videoplayback for now
* test if subsystem is loaded
* Merge branch 'master' into develop
* fix missing labels on game and single_task config
* add video_playback config
* cache available cgroup names
* add xfce & lxde configs
* list configs with no info object as well
* better error reporting and handling
* better error messages on connecting errors
* retry process lookup in remote api calls
* install all man pages
* fix typo schduler -> scheduler in ulatency
* add manpage for run-single-task
* add manpage for run-game
* add ulatency-gui to ulatency.1 manpage
* fix goption warning for G_OPTION_FLAG_NO_ARG
0.5.0-rc3 / 2011-03-24
==================
* fix client install rules
0.5.0-rc2 / 2011-03-24
==================
* also run instant filters on processes
* do mixture of read/write on mem pages
* don't put active processes into rt io
* implement stress mode in memleak
* implement io prio settings for processes
* add banshee player
* Merge commit 'dbdcb918d051d71c913e63ed6bea605088b457ed'
* more robust version of terminal size detection
* fix io bottleneck detector
* catch errors caused in terminal detection
* Merge commit 'f6715991672ccc8c7fd239b8139aae74dac3a3f5'
* work without python-dbus-qt4
* add set config menu in window
0.5.0-rc1 / 2011-03-23
==================
* Merge commit 'd8b2bd5c248c06b39c7d7da56a3961cad1d36cc9'
* update readme to reflect recent depencies
* let gui survive daemon restart
* update gui to use policykit
* install doc files, bump version
* Merge commit '4d65ec602b0673876732fe100506f68fbc8e08b0'
* updates to documentation
* optimize doxygen for project
* Updated Start Hacking (markdown)
* don't start ulatencyd more then once
* optional build docs
* Merge commit 'bd23966e9e27132cedceb775d01c8fe91e5bb9f3'
* add make docs target
* Updated Home (markdown)
* rename file
* Merge commit '76d54cf31eacbb060bcad7f5d41b8e6d78976bb0'
* start changing documentation
* add api doc generation trough doxygen
* add manpages. thanks Alessandro
* add script for update external repositories
* Add 'docs/wiki/' from commit '978fb5626ac4f2c61c6704dba636c7562b3ce09e'
* add script to run ulatencyd under alleyoop
* Merge commit '0a9ff7e9373c6d7a9f202f1ebd2252291e65e86a'
* adjust cmake rules
* implement policykit support
* better run command code
* use glob matching in simplerules
* cleanup exe readlink
* add recrusive flags api to dbus interface
* add rules for boinc client
* use full path on exe matches, not substring
* adjust dbus interface to recrusive list flags changes
* add u_proc_list_flags function, inherit changes
* ensure notifiy release agent is set
* add extra executable for gui/close window change
* print help config on run command
* add support for execute process in switches scheduler config
* use u_task struct for task storage
* add /usr/local/games to game path
* add single_task & game config
* bug fix: check data if none
* bug fix:function prnt doesnt worked under python3
* move scheduler configs into own path
* implement hard limits on memory usage
* reduce io prio on poison targets
* bump version
* fix install rules
* Updated 1 FAQ (rest)
* Updated Home (markdown)
* Updated Flag system (markdown)
* Updated Flag system (markdown)
* Updated Flag system (markdown)
* Updated Home (markdown)
* Created flags.md (markdown)
* Updated Home (markdown)
* Updated 1 FAQ (rest)
* Write a small message here explaining this change. (Optional)
* Updated Writing Rules (markdown)
* Updated Adjusting default scheduler (markdown)
* Updated 1 FAQ (rest)
* Updated How does it work (markdown)
* Updated How does it work (markdown)
* Updated 1 FAQ (rest)
* Updated 1 FAQ (rest)
* Updated Start Hacking (markdown)
* Created Start-hacking (markdown)
* Updated Home (markdown)
* Updated 1 FAQ (rest)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Created Adjusting default scheduler (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* started writing rules howto
* Created How does it work (markdown)
* Updated Home (markdown)
* Updated 1 FAQ (rest)
* Updated 1 FAQ (rest)
* Updated 1 FAQ (rest)
* Updated 1 FAQ (rest)
* Write a small message here explaining this change. (Optional)
* Updated 1 FAQ (rest)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated Home (markdown)
* Updated 1 Does ulatencyd support my cgroups mount points (rest)
* Created Faq (rest)
* Updated Home (markdown)
* start dbus specs
* Updated Home (markdown)
* Updated Home (markdown)
* Created Ideas to test (markdown)
* Created Architecture (markdown)
* add arch image
* Initial Commit