Package: ulatencyd
Version: 0.5.0-5
Severity: normal

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   sudo /etc/init.d/ulatencyd restart
   * What was the outcome of this action?
   sysctl kernel.sched_autogroup_enabled will change to 0
   * What outcome did you expect instead?
   sysctl kernel.sched_autogroup_enabled will not change.

   when i restart ulatencyd(/etc/init.d/ulatencyd restart),
   sysctl kernel.sched_autogroup_enabled will change to 0.

*** End of the template - remove these lines ***


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.3.4-core2-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ulatencyd depends on:
ii  dbus                   1.5.12-1
ii  dpkg                   1.16.3
ii  libc6                  2.13-32
ii  libdbus-1-3            1.5.12-1
ii  libdbus-glib-1-2       0.98-1
ii  libglib2.0-0           2.32.2-1
ii  liblua5.1-0            5.1.5-1
ii  libpolkit-gobject-1-0  0.105-1
ii  libxau6                1:1.0.7-1
ii  libxcb1                1.8.1-1
ii  lua-posix              5.1.19-1
ii  lua5.1 [lua]           5.1.5-1

ulatencyd recommends no packages.

ulatencyd suggests no packages.

-- Configuration Files:
/etc/ulatencyd/cgroups.conf changed:
-- this is a lua file
CGROUP_ROOT = "/sys/fs/cgroup"
-- /sys/fs/cgroup is not available on older kernels, we need to change that
-- in those cases
fp = io.open(CGROUP_ROOT, "r")
if not fp then
  CGROUP_ROOT = "/dev/cgroup"
else
  fp:close()
end
-- edit the below only when you know what you are doing
-- describes which subsystems are mounted under
-- which toplevel path
CGROUP_MOUNTPOINTS = {
  cpu={"cpu"},
-- please have a look at README.Debian to see why the memory resource
-- controller was disabled, and how to re-enable it.
  memory={"memory"},
  blkio={"blkio"},
  cpuset={"cpuset"}
}
-- FIXME we need some better solution for that :-/
-- cpuset, very powerfull, but can't create a group with unset cpus or mems
CGROUP_DEFAULT = {
  cpu={["notify_on_release"] = "1",},
  memory={["notify_on_release"] = "1",},
  io={["notify_on_release"] = "1",},
  cpuset={["notify_on_release"] = "1",},
}

/etc/ulatencyd/rules/gnome.lua changed:
--[[
    Copyright 2010,2011 ulatencyd developers
    This file is part of ulatencyd.
    License: GNU General Public License 3 or later
]]--
GnomeUI = {
  name = "GnomeUI",
  re_basename = 
"metacity|compiz|gnome-panel|gtk-window-decorator|nautilus|Thunar",
  --re_basename = "metacity",
  check = function(self, proc)
    local flag = ulatency.new_flag("user.ui")
    proc:add_flag(flag)
    proc:set_oom_score(-300)
    rv = ulatency.filter_rv(ulatency.FILTER_STOP)
    return rv
  end
}
GnomeCore = {
  name = "GnomeCore",
  re_basename = "x-session-manager",
    -- adjust the oom score adjust so x server will more likely survive
  check = function(self, proc)
    proc:set_oom_score(-300)
    return ulatency.filter_rv(ulatency.FILTER_STOP)
  end
}
-- gnome does a very bad job in setting grpid's, causing the complete
-- desktop to be run under one group. we fix this problem here, ugly
-- but working
-- filter that instantly sets a fake group on newly spawned processes from
-- gnome-panel or x-session-manager
GnomeFix = RunnerFix.new("GnomeFix", {"gnome-panel", "x-session-manager", 
"gnome-session"})
-- on start we have to fix all processes that have descented from kde
local function cleanup_gnome_mess()
  cleanup_desktop_mess({"x-session-manager", "gnome-session", "gnome-panel"})
  return false
end
ulatency.add_timeout(cleanup_gnome_mess, 1000)
ulatency.register_filter(GnomeCore)
ulatency.register_filter(GnomeUI)
ulatency.register_filter(GnomeFix)

/etc/ulatencyd/scheduler/20-desktop.lua changed:
--[[
    Copyright 2010,2011 ulatencyd developers
    This file is part of ulatencyd.
    License: GNU General Public License 3 or later
]]--
SCHEDULER_MAPPING_DESKTOP = {
  info = {
    description = "a good default desktop configuration"
  }
}
-- cpu & memory configuration
SCHEDULER_MAPPING_DESKTOP["cpu"] =
{
  {
    name = "rt_tasks",
    cgroups_name = "rt_tasks",
    param = { ["cpu.shares"]="3048", ["?cpu.rt_runtime_us"] = "949500" },
    check = function(proc)
          local rv = proc.received_rt or check_label({"sched.rt"}, proc) or 
proc.vm_size == 0
          return rv
        end,
  },
  {
    name = "system_essential",
    cgroups_name = "sys_essential",
    param = { ["cpu.shares"]="3048" },
    label = { "system.essential" }
  },
  {
    name = "user",
    cgroups_name = "usr_${euid}",
    check = function(proc)
              return ( proc.euid > 999 )
            end,
    param = { ["cpu.shares"]="3048",  ["?cpu.rt_runtime_us"] = "100" },
    children = {
      { 
        name = "poison",
        param = { ["cpu.shares"]="10" },
        label = { "user.poison" },
        cgroups_name = "psn_${pid}",
      },
      { 
        name = "poison_group",
        param = { ["cpu.shares"]="300" },
        cgroups_name = "pgr_${pgrp}",
        check = function(proc)
                  local rv = ulatency.find_flag(ulatency.list_flags(), {name = 
"user.poison.group",
                                                                    value = 
proc.pgrp})
                  return rv ~= nil
                end,
      },
      { 
        name = "bg_high",
        param = { ["cpu.shares"]="1000",  ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.bg_high" },
      },
      { 
        name = "media",
        param = { ["cpu.shares"]="2600", ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.media" },
      },
      {
        name = "browser",
        param = { ["cpu.shares"]="2500", ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.browser" },
      },
      {
        name = "kvm",
        param = { ["cpu.shares"]="400", ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.kvm" },
      },
      {
        name = "game",
        param = { ["cpu.shares"]="3048", ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.game" },
      },
      { 
        name = "ui",
        param = { ["cpu.shares"]="2000", ["?cpu.rt_runtime_us"] = "1"},
        label = { "user.ui" }
      },
      { 
        name = "active",
        param = { ["cpu.shares"]="1500", ["?cpu.rt_runtime_us"] = "1"},
        check = function(proc)
            return proc.is_active
          end
      },
      { 
        name = "idle",
        param = { ["cpu.shares"]="200"},
        label = { "user.idle" },
      },
      { 
        name = "group",
        param = { ["cpu.shares"]="600", ["?cpu.rt_runtime_us"] = "1"},
        cgroups_name = "grp_${pgrp}",
        check = function(proc)
                  return true
                end,
      },
    },
  },
  {
    name = "system",
    cgroups_name = "sys_idle",
    label = { "daemon.idle" },
    param = { ["cpu.shares"]="1"},
  },
  {
    name = "system",
    cgroups_name = "sys_bg",
    label = { "daemon.bg" },
    param = { ["cpu.shares"]="600"},
  },
  {
    name = "system",
    cgroups_name = "sys_daemon",
    check = function(proc)
              -- don't put kernel threads into a cgroup
              return (proc.ppid ~= 0 or proc.pid == 1)
            end,
    param = { ["cpu.shares"]="800",
              ["?cpu.rt_runtime_us"] = "1"},
  }
}
SCHEDULER_MAPPING_DESKTOP["memory"] =
{
  {
    name = "system_essential",
    cgroups_name = "sys_essential",
    param = { ["?memory.swappiness"] = "0" },
    label = { "system.essential" }
  },
  {
    name = "user",
    cgroups_name = "usr_${euid}",
    check = function(proc)
              return ( proc.euid > 999 )
            end,
    children = {
      { 
        name = "poison",
        label = { "user.poison" },
        cgroups_name = "psn_${pid}",
        adjust_new = function(cgroup, proc)
                  cgroup:add_task(proc.pid)
                  cgroup:commit()
                  bytes = cgroup:get_value("memory.usage_in_bytes")
                  if not bytes then
                    ulatency.log_warning("can't access memory subsystem")
                    return
                  end
                  bytes = 
math.floor(bytes*(tonumber(ulatency.get_config("memory", "process_downsize")) 
or 0.95))
                  cgroup:set_value("memory.soft_limit_in_bytes", bytes)
                  -- we use soft limit, but without limit we can't set the 
memsw limit
                  local max_rss = 
math.floor(num_or_percent(ulatency.get_config("memory", "max_rss"),
                                                 
Scheduler.meminfo.kb_main_total,
                                                 false) * 1024)
                  local total_limit = 
math.max(math.floor(num_or_percent(ulatency.get_config("memory", 
"total_limit"), 
                                                   
Scheduler.meminfo.kb_main_total + Scheduler.meminfo.kb_swap_total) * 1024),
                                               max_rss)
                  ulatency.log_info("memory container created: ".. cgroup.name 
.. " max_rss:" .. tostring(max_rss) .. " max_total:" .. tostring(total_limit) 
.. " soft_limit:".. tostring(bytes))
                  cgroup:set_value("memory.limit_in_bytes", max_rss)
                  cgroup:set_value("?memory.memsw.limit_in_bytes", total_limit, 
max_rss)
                  cgroup:commit()
                end
      },
      { 
        name = "poison_group",
        cgroups_name = "pgr_${pgrp}",
        check = function(proc)
                  local rv = ulatency.find_flag(ulatency.list_flags(), {name = 
"user.poison.group",
                                                                    value = 
proc.pgrp})
                  return rv ~= nil
                end,
        adjust_new = function(cgroup, proc)
                  local flag = ulatency.find_flag(ulatency.list_flags(), 
                                                    { name = 
"user.poison.group",
                                                      value = proc.pgrp })
                  cgroup:add_task(proc.pid)
                  cgroup:set_value("memory.soft_limit_in_bytes", 
math.ceil(flag.threshold*(tonumber(ulatency.get_config("memory", 
"group_downsize") or 0.95))))
                  -- we use soft limit, but without limit we can't set the 
memsw limit
                  local max_rss = 
math.floor(num_or_percent(ulatency.get_config("memory", "max_rss"),
                                                 
Scheduler.meminfo.kb_main_total,
                                                 false) * 1024)
                  local total_limit = 
math.max(math.floor(num_or_percent(ulatency.get_config("memory", 
"total_limit"), 
                                                   
Scheduler.meminfo.kb_main_total + Scheduler.meminfo.kb_swap_total) * 1024),
                                               max_rss)
                  ulatency.log_info("memory container created: ".. cgroup.name 
.. " max_rss:" .. tostring(max_rss) .. " max_total:" .. tostring(total_limit) 
.. " soft_limit:".. tostring(bytes))
                  cgroup:set_value("memory.limit_in_bytes", max_rss)
                  cgroup:set_value("?memory.memsw.limit_in_bytes", total_limit, 
max_rss)
                  cgroup:commit()
                end
      },
      { 
        name = "bg_high",
        param = { ["?memory.swappiness"] = "20" },
        label = { "user.bg_high" },
      },
      { 
        name = "media",
        param = { ["?memory.swappiness"] = "30" },
        label = { "user.media" },
      },
      {
        name = "browser",
        param = { ["?memory.swappiness"] = "10" },
        label = { "user.browser" },
      },
      {
        name = "kvm",
        param = { ["?memory.swappiness"] = "20" },
        label = { "user.kvm" },
      },
      { 
        name = "game",
        param = { ["?memory.swappiness"] = "20" },
        label = { "user.game" },
        adjust_new = function(cgroup, proc)
                local max_rss = Scheduler.meminfo.kb_main_total * 0.80 * 1024
                cgroup:set_value("memory.limit_in_bytes", max_rss)
        end
      },
      { 
        name = "ui",
        param = { ["?memory.swappiness"] = "0" },
        label = { "user.ui" },
      },
      { 
        name = "active",
        param = { ["?memory.swappiness"] = "0" },
        check = function(proc)
            return proc.is_active
          end
      },
      { 
        name = "idle",
        param = { ["?memory.swappiness"] = "100" },
        label = { "user.idle" },
      },
      { 
        name = "group",
        param = {["?memory.swappiness"] = "60" },
        cgroups_name = "default",
        check = function(proc)
                  return true
                end,
      },
    },
  },
  {
    name = "system",
    cgroups_name = "sys_idle",
    label = { "daemon.idle" },
    param = { ["?memory.swappiness"] = "100" },
  },
  {
    name = "system",
    cgroups_name = "sys_bg",
    label = { "daemon.bg" },
    param = { ["?memory.swappiness"] = "100" },
  },
  {
    name = "system",
    cgroups_name = "sys_daemon",
    check = function(proc)
              -- don't put kernel threads into a cgroup
              return (proc.ppid ~= 0 or proc.pid == 1)
            end,
    param = { ["?memory.swappiness"] = "70" },
  },
  { 
    name = "kernel",
    cgroups_name = "",
    check = function(proc)
              return (proc.vm_size == 0)
            end
  },
}
-- io configuration. blkio does not support hirarchies
SCHEDULER_MAPPING_DESKTOP["blkio"] =
{
  {
    name = "poison",
    label = { "user.poison", "user.poison.group" },
    cgroups_name = "psn_${pgrp}",
    param = { ["blkio.weight"]="1" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 7, ulatency.IOPRIO_CLASS_IDLE)
             end,
  },
  {
    name = "active",
    cgroups_name = "usr_${euid}_active",
    param = { ["blkio.weight"]="1000" },
    check = function(proc)
        return proc.is_active
      end,
    adjust = function(cgroup, proc)
                save_io_prio(proc, 3, ulatency.IOPRIO_CLASS_BE)
             end,
  },
  { 
    name = "game",
    cgroups_name = "usr_${euid}_game",
    param = { ["blkio.weight"]="1000" },
    label = { "user.game" },
  },
  { 
    name = "ui",
    label = { "user.ui" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 2, ulatency.IOPRIO_CLASS_BE)
             end,
  },
  {
    name = "idle",
    param = { ["blkio.weight"]="1" },
    label = { "daemon.idle", "user.idle" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 5, ulatency.IOPRIO_CLASS_IDLE)
             end,
  },
  {
    name = "media",
    param = { ["blkio.weight"]="350" },
    cgroups_name = "grp_${pgrp}",
    label = { "user.media" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 7, ulatency.IOPRIO_CLASS_RT)
             end,
  },
  {
    name = "browser",
    param = { ["blkio.weight"]="600" },
    cgroups_name = "usr_${euid}_browser",
    label = { "user.browser" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 2, ulatency.IOPRIO_CLASS_BE)
             end,
  },
  {
    name = "kvm",
    param = { ["blkio.weight"]="100" },
    cgroups_name = "usr_${euid}_kvm",
    label = { "user.kvm" },
    adjust = function(cgroup, proc)
                save_io_prio(proc, 5, ulatency.IOPRIO_CLASS_IDLE)
             end,
  },
  {
    name = "group",
    param = { ["blkio.weight"]="300" },
    cgroups_name = "grp_${pgrp}",
    check = function(proc)
              return proc.pgrp > 0
            end,
    adjust = function(cgroup, proc)
                restore_io_prio(proc)
             end,
  },
  {
    name = "kernel",
    cgroups_name = "",
    check = function(proc)
              return (proc.vm_size == 0)
            end
  },
}

/etc/ulatencyd/simple.d/audio.conf changed:
audacious            user.media
audacious*           user.media

/etc/ulatencyd/simple.d/games.conf changed:
/usr/games/*              user.game inherit=1

/etc/ulatencyd/simple.d/video.conf changed:
?mplayer*                     user.media
mplayer*                      user.media
xine                          user.media
?vlc                          user.media
vlc                           user.media
totem                         user.media
smplayer                      user.media

/etc/ulatencyd/simple.d/xfce.conf changed:
xfwm4                           user.ui
xfce4-panel                     user.ui
xfdesktop                       user.ui


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to