linux-next: manual merge of the akpm tree with the cgroup tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
mm/memcontrol.c between commit ab5196c202c6 ("memcg: make
mem_cgroup_reparent_charges non failing") from the cgroup tree and commit
"memcg: allow a memcg with kmem charges to be destructed" from the akpm
tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc mm/memcontrol.c
index 8f2b789,540bac5..0000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -3987,11 -4015,15 +3992,12 @@@ static void mem_cgroup_force_empty_list
   *
   * Caller is responsible for holding css reference on the memcg.
   */
 -static int mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 +static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
  {
 -	struct cgroup *cgrp = memcg->css.cgroup;
  	int node, zid;
+ 	u64 usage;
  
  	do {
 -		if (cgroup_task_count(cgrp) || !list_empty(&cgrp->children))
 -			return -EBUSY;
  		/* This is for making all *used* pages to be on LRU. */
  		lru_add_drain_all();
  		drain_all_stock_sync(memcg);
@@@ -4016,7 -4053,11 +4027,9 @@@
  		 * right after the check. RES_USAGE should be safe as we always
  		 * charge before adding to the LRU.
  		 */
- 	} while (res_counter_read_u64(&memcg->res, RES_USAGE) > 0);
+ 		usage = res_counter_read_u64(&memcg->res, RES_USAGE) -
+ 			res_counter_read_u64(&memcg->kmem, RES_USAGE);
+ 	} while (usage > 0);
 -
 -	return 0;
  }
  
  /*

Attachment: pgpWEJjhXhbdt.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux