All of lore.kernel.org
 help / color / mirror / Atom feed
* Attaching a process to cgroups
@ 2012-06-19 18:58 Alexey Vlasov
  2012-06-20  3:34 ` Daisuke Nishimura
  2012-06-20 12:28 ` Mike Galbraith
  0 siblings, 2 replies; 20+ messages in thread
From: Alexey Vlasov @ 2012-06-19 18:58 UTC (permalink / raw)
  To: linux-kernel

Hi.

Is it possible to somehow fasten a process of pid attaching to cgroup?
The problem is the pid attaches to a task-file with some strange delay:

22:28:00.788224 open("/sys/fs/cgroup/memory/virtwww/w_test-l24-apache1_4bdf3d13/apache/tasks", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3 <0.000035>
22:28:00.788289 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000004>
22:28:00.788326 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5e78074000 <0.000005>
22:28:00.788355 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 <0.000004>
22:28:00.788389 lseek(3, 0, SEEK_SET)   = 0 <0.000004>
22:28:00.788426 write(3, "16317\n", 6)  = 6 <0.128094>
22:28:00.916578 close(3)                = 0 <0.000006>

For a comparison here's a test attaching pid-file in placed tmpfs: 

22:24:41.892562 open("/tmp/w_test-l24-apache1_4bdf3d13/tasks", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3 <0.000010>
22:24:41.892597 fstat(3, {st_mode=S_IFREG|0644, st_size=6, ...}) = 0 <0.000004>
22:24:41.892631 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5685b6f000 <0.000006>
22:24:41.892664 fstat(3, {st_mode=S_IFREG|0644, st_size=6, ...}) = 0 <0.000004>
22:24:41.892701 lseek(3, 6, SEEK_SET)   = 6 <0.000004>
22:24:41.892738 write(3, "25966\n", 6)  = 6 <0.000008>
22:24:41.892767 close(3)                = 0 <0.000005>

Here goes it immediately.

-- 
BRGDS. Alexey Vlasov.

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

end of thread, other threads:[~2012-08-10  9:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19 18:58 Attaching a process to cgroups Alexey Vlasov
2012-06-20  3:34 ` Daisuke Nishimura
2012-06-20 11:08   ` Alexey Vlasov
2012-06-20 12:28 ` Mike Galbraith
2012-06-21  7:54   ` Alexey Vlasov
2012-06-21  8:23     ` Mike Galbraith
2012-06-21  8:26       ` Mike Galbraith
2012-06-26 18:06       ` Paul E. McKenney
2012-06-27  7:23         ` Mike Galbraith
2012-06-27 17:10           ` Paul E. McKenney
2012-06-28  2:40             ` Mike Galbraith
2012-07-23 20:41       ` Andrea Righi
2012-07-24  1:19         ` Mike Galbraith
2012-07-25 13:36   ` Alexey Vlasov
2012-07-25 13:57     ` Mike Galbraith
2012-07-26 13:02       ` Alexey Vlasov
2012-07-26 14:44         ` Mike Galbraith
2012-08-08 16:40       ` Alexey Vlasov
2012-08-08 16:51         ` Paul E. McKenney
2012-08-10  9:53           ` Alexey Vlasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.