Skip to content
Browse files

o-s-d mem mappings: prefer 'bg_high', 'ui', 'active', 'media' over 'p…

…oison' and 'poison_group'
  • Loading branch information...
1 parent 5131e5e commit f1a445cd61f44397b7a516fb7648a7703cc4ef4f @gajdusek gajdusek committed
Showing with 28 additions and 28 deletions.
  1. +28 −28 conf/scheduler/20-one-seat-desktop.lua
View
56 conf/scheduler/20-one-seat-desktop.lua
@@ -269,6 +269,34 @@ SCHEDULER_MAPPING_ONE_SEAT_DESKTOP["memory"] =
end,
children = {
{
+ {
+ name = "bg_high",
+ param = { ["?memory.swappiness"] = "20" },
+ label = { "user.bg_high" },
+ },
+ {
+ name = "ui",
+ param = { ["?memory.swappiness"] = "10" },
+ label = { "user.ui" }
+ },
+ {
+ name = "active",
+ param = { ["?memory.swappiness"] = "20" },
+ check = function(proc)
+ if not proc.is_active then return false end
+ for j, flag in pairs(ulatency.list_flags()) do
+ if flag.name == "pressure" or flag.name == "emergency" then
+ return proc.active_pos == 1
+ end
+ end
+ return true
+ end
+ },
+ {
+ name = "media",
+ param = { ["?memory.swappiness"] = "40" },
+ label = { "user.media" },
+ },
name = "poison",
label = { "user.poison" },
cgroups_name = "psn_${pid}",
@@ -323,34 +351,6 @@ SCHEDULER_MAPPING_ONE_SEAT_DESKTOP["memory"] =
end
},
{
- name = "bg_high",
- param = { ["?memory.swappiness"] = "20" },
- label = { "user.bg_high" },
- },
- {
- name = "ui",
- param = { ["?memory.swappiness"] = "10" },
- label = { "user.ui" }
- },
- {
- name = "active",
- param = { ["?memory.swappiness"] = "20" },
- check = function(proc)
- if not proc.is_active then return false end
- for j, flag in pairs(ulatency.list_flags()) do
- if flag.name == "pressure" or flag.name == "emergency" then
- return proc.active_pos == 1
- end
- end
- return true
- end
- },
- {
- name = "media",
- param = { ["?memory.swappiness"] = "40" },
- label = { "user.media" },
- },
- {
name = "idle",
param = { ["?memory.swappiness"] = "100" },
label = { "user.idle", "daemon.idle" },

0 comments on commit f1a445c

Please sign in to comment.
Something went wrong with that request. Please try again.