> > Sorry, if I missed it, but I did not see any time overhead of moving a > > task after these changes. Could you please help me understand the cost > > of moving say a task with 1G anonymous memory to another group and > > the cost of moving a task with 512MB anonymous and 512 page cache > > mapped, etc. It would be nice to understand the overall cost. > > > O.K. > I'll test programs with big anonymous pages and measure the time and report. > I measured the elapsed time of "echo > /tasks" on KVM guest with 4CPU/4GB(Xeon/3GHz). - used the attached simple program. - made 2 directories(00, 01) under root, and enabled recharge_at_immigrate in both. - measured the elapsed time by "time -p" for moving between: (1) root -> 00 (2) 00 -> 01 we don't need to call res_counter_uncharge against root, so (1) would be smaller than (2). (3) 00(setting mem.limit to half size of total) -> 01 To compare the overhead of anon and swap. Results: | 252M | 512M | 1G -----+--------+--------+-------- (1) | 0.21 | 0.41 | 0.821 -----+--------+--------+-------- (2) | 0.43 | 0.85 | 1.71 -----+--------+--------+-------- (3) | 0.40 | 0.81 | 1.62 -----+--------+--------+-------- hmm, it would be better to add some comments to memory.txt like: Note: It may take several seconds if you move charges in giga bytes order. Regards, Daisuke Nishimura.