Linux cgroups development
 help / color / mirror / Atom feed
* CGROUPS: HowTo: perform force_empty
@ 2015-02-02  9:53 PINTU KUMAR
  2015-02-02 12:15 ` Michal Hocko
  0 siblings, 1 reply; 4+ messages in thread
From: PINTU KUMAR @ 2015-02-02  9:53 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA,
	bsingharora-Re5JQEeQqe8AvxtiuMwx3w,
	kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A, mhocko-AlSwsSmVLrQ,
	hannes-druUgvl0LCNAfugRpC6u6w, xemul-GEFAQzZX7r8dnm+yROfE0A
  Cc: cpgs-Sze3O3UU22JBDgjK7y7TUQ

Hi,

I have a question about memory cgroups under Linux kernel 3.10.
Under: /sys/fs/cgroup/memory/:

I found, memory.force_empty.
But, when I try to do the following it says invalid argument:
# echo 0 > memory.force_empty
sh: echo: write error: Invalid argument

It even fails with "echo 1"

I am using this command from the shell using the root login.
Can you tell me how to execute the force_empty command.

Or, how to release all the memory under all cgroups and release it to the
system?

Under, mm/memcontrol.c , if I use the function: mem_cgroup_force_empty(struct
mem_cgroup *memcg), will it help to release all memory?
But, then, how to initialize the memcg data structure?

Can you provide some example to use this API, from some other kernel sub-system.


Thank you.
Regards,
Pintu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-02 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02  9:53 CGROUPS: HowTo: perform force_empty PINTU KUMAR
2015-02-02 12:15 ` Michal Hocko
     [not found]   ` <20150202121520.GB4583-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-02-02 14:08     ` PINTU KUMAR
2015-02-02 14:19       ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox