Lines Matching refs:nid
53 list_lru_from_memcg_idx(struct list_lru *lru, int nid, int idx) in list_lru_from_memcg_idx() argument
58 return mlru ? &mlru->node[nid] : NULL; in list_lru_from_memcg_idx()
60 return &lru->node[nid].lru; in list_lru_from_memcg_idx()
64 list_lru_from_kmem(struct list_lru *lru, int nid, void *ptr, in list_lru_from_kmem() argument
67 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_from_kmem()
78 l = list_lru_from_memcg_idx(lru, nid, memcg_kmem_id(memcg)); in list_lru_from_kmem()
104 list_lru_from_memcg_idx(struct list_lru *lru, int nid, int idx) in list_lru_from_memcg_idx() argument
106 return &lru->node[nid].lru; in list_lru_from_memcg_idx()
110 list_lru_from_kmem(struct list_lru *lru, int nid, void *ptr, in list_lru_from_kmem() argument
115 return &lru->node[nid].lru; in list_lru_from_kmem()
121 int nid = page_to_nid(virt_to_page(item)); in list_lru_add() local
122 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_add()
128 l = list_lru_from_kmem(lru, nid, item, &memcg); in list_lru_add()
132 set_shrinker_bit(memcg, nid, in list_lru_add()
145 int nid = page_to_nid(virt_to_page(item)); in list_lru_del() local
146 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_del()
151 l = list_lru_from_kmem(lru, nid, item, NULL); in list_lru_del()
179 int nid, struct mem_cgroup *memcg) in list_lru_count_one() argument
185 l = list_lru_from_memcg_idx(lru, nid, memcg_kmem_id(memcg)); in list_lru_count_one()
196 unsigned long list_lru_count_node(struct list_lru *lru, int nid) in list_lru_count_node() argument
200 nlru = &lru->node[nid]; in list_lru_count_node()
206 __list_lru_walk_one(struct list_lru *lru, int nid, int memcg_idx, in __list_lru_walk_one() argument
210 struct list_lru_node *nlru = &lru->node[nid]; in __list_lru_walk_one()
216 l = list_lru_from_memcg_idx(lru, nid, memcg_idx); in __list_lru_walk_one()
268 list_lru_walk_one(struct list_lru *lru, int nid, struct mem_cgroup *memcg, in list_lru_walk_one() argument
272 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_walk_one()
276 ret = __list_lru_walk_one(lru, nid, memcg_kmem_id(memcg), isolate, in list_lru_walk_one()
284 list_lru_walk_one_irq(struct list_lru *lru, int nid, struct mem_cgroup *memcg, in list_lru_walk_one_irq() argument
288 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_walk_one_irq()
292 ret = __list_lru_walk_one(lru, nid, memcg_kmem_id(memcg), isolate, in list_lru_walk_one_irq()
298 unsigned long list_lru_walk_node(struct list_lru *lru, int nid, in list_lru_walk_node() argument
304 isolated += list_lru_walk_one(lru, nid, NULL, isolate, cb_arg, in list_lru_walk_node()
313 struct list_lru_node *nlru = &lru->node[nid]; in list_lru_walk_node()
316 isolated += __list_lru_walk_one(lru, nid, index, in list_lru_walk_node()
340 int nid; in memcg_init_list_lru_one() local
347 for_each_node(nid) in memcg_init_list_lru_one()
348 init_one_lru(&mlru->node[nid]); in memcg_init_list_lru_one()
390 static void memcg_reparent_list_lru_node(struct list_lru *lru, int nid, in memcg_reparent_list_lru_node() argument
393 struct list_lru_node *nlru = &lru->node[nid]; in memcg_reparent_list_lru_node()
403 src = list_lru_from_memcg_idx(lru, nid, src_idx); in memcg_reparent_list_lru_node()
406 dst = list_lru_from_memcg_idx(lru, nid, dst_idx); in memcg_reparent_list_lru_node()
412 set_shrinker_bit(dst_memcg, nid, lru_shrinker_id(lru)); in memcg_reparent_list_lru_node()