• Home
  • Raw
  • Download

Lines Matching refs:ctrl

42 	struct swap_cgroup_ctrl *ctrl;  in swap_cgroup_prepare()  local
45 ctrl = &swap_cgroup_ctrl[type]; in swap_cgroup_prepare()
47 for (idx = 0; idx < ctrl->length; idx++) { in swap_cgroup_prepare()
51 ctrl->map[idx] = page; in swap_cgroup_prepare()
60 __free_page(ctrl->map[idx]); in swap_cgroup_prepare()
65 static struct swap_cgroup *__lookup_swap_cgroup(struct swap_cgroup_ctrl *ctrl, in __lookup_swap_cgroup() argument
71 mappage = ctrl->map[offset / SC_PER_PAGE]; in __lookup_swap_cgroup()
80 struct swap_cgroup_ctrl *ctrl; in lookup_swap_cgroup() local
82 ctrl = &swap_cgroup_ctrl[swp_type(ent)]; in lookup_swap_cgroup()
84 *ctrlp = ctrl; in lookup_swap_cgroup()
85 return __lookup_swap_cgroup(ctrl, offset); in lookup_swap_cgroup()
100 struct swap_cgroup_ctrl *ctrl; in swap_cgroup_cmpxchg() local
105 sc = lookup_swap_cgroup(ent, &ctrl); in swap_cgroup_cmpxchg()
107 spin_lock_irqsave(&ctrl->lock, flags); in swap_cgroup_cmpxchg()
113 spin_unlock_irqrestore(&ctrl->lock, flags); in swap_cgroup_cmpxchg()
129 struct swap_cgroup_ctrl *ctrl; in swap_cgroup_record() local
136 sc = lookup_swap_cgroup(ent, &ctrl); in swap_cgroup_record()
138 spin_lock_irqsave(&ctrl->lock, flags); in swap_cgroup_record()
149 sc = __lookup_swap_cgroup(ctrl, offset); in swap_cgroup_record()
151 spin_unlock_irqrestore(&ctrl->lock, flags); in swap_cgroup_record()
172 struct swap_cgroup_ctrl *ctrl; in swap_cgroup_swapon() local
184 ctrl = &swap_cgroup_ctrl[type]; in swap_cgroup_swapon()
186 ctrl->length = length; in swap_cgroup_swapon()
187 ctrl->map = array; in swap_cgroup_swapon()
188 spin_lock_init(&ctrl->lock); in swap_cgroup_swapon()
191 ctrl->map = NULL; in swap_cgroup_swapon()
192 ctrl->length = 0; in swap_cgroup_swapon()
210 struct swap_cgroup_ctrl *ctrl; in swap_cgroup_swapoff() local
216 ctrl = &swap_cgroup_ctrl[type]; in swap_cgroup_swapoff()
217 map = ctrl->map; in swap_cgroup_swapoff()
218 length = ctrl->length; in swap_cgroup_swapoff()
219 ctrl->map = NULL; in swap_cgroup_swapoff()
220 ctrl->length = 0; in swap_cgroup_swapoff()