public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Containers: css_put() dilemma
@ 2007-07-16 18:50 Balbir Singh
  2007-07-16 19:03 ` Paul (宝瑠) Menage
  0 siblings, 1 reply; 26+ messages in thread
From: Balbir Singh @ 2007-07-16 18:50 UTC (permalink / raw)
  To: Paul Menage, Andrew Morton
  Cc: Srivatsa Vaddagiri, Pavel Emelianov, Vaidyanathan Srinivasan,
	Serge E. Hallyn, linux kernel mailing list, Linux Containers,
	Paul Jackson

Hi, Paul,

I've run into a strange problem with css_put(). After the changes for notify_on_release(), the css_put() routine can now block and it blocks on
the container_mutex. This implies that css_put() cannot be called if

1. We cannot block
2. We already hold the container_mutex

The problem I have is that of preventing the destruction of my container
(when the user does rmdir). If the user migrates away all tasks and does
an rmdir, the only way to prevent the container from going away is through
css_get() references. In my case, some pages have been allocated from the
container and hence I do not want it to go away, until all the pages
charged to it are freed. When I use css_get/put() to prevent destruction
I am blocked by the limitations of css_put() listed above.

Do you have any recommendations for a cleaner solution? I suspect we'll
need can_destroy() callbacks (similar to can_attach()).

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

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

end of thread, other threads:[~2007-07-19  3:44 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 18:50 Containers: css_put() dilemma Balbir Singh
2007-07-16 19:03 ` Paul (宝瑠) Menage
2007-07-17  2:21   ` Balbir Singh
2007-07-17  2:35     ` Paul (宝瑠) Menage
2007-07-17  7:00       ` Balbir Singh
2007-07-17  7:18         ` Paul (宝瑠) Menage
2007-07-17 10:28           ` Balbir Singh
2007-07-17 15:49             ` Paul (宝瑠) Menage
2007-07-17 16:02               ` Dave Hansen
2007-07-17 16:15                 ` Paul (宝瑠) Menage
2007-07-17 17:23               ` Paul Jackson
2007-07-17 17:40               ` Balbir Singh
2007-07-17 17:44                 ` Paul (宝瑠) Menage
2007-07-17 17:55                   ` Paul Jackson
2007-07-17 17:57                     ` Paul (宝瑠) Menage
2007-07-17 18:11                   ` Balbir Singh
2007-07-17 18:26                     ` Paul (宝瑠) Menage
2007-07-18  4:29                       ` Balbir Singh
2007-07-18  5:30                         ` Balbir Singh
2007-07-18  5:52                           ` Srivatsa Vaddagiri
2007-07-18 23:15                           ` Paul Menage
2007-07-19  3:44                             ` Balbir Singh
2007-07-18  6:07                         ` Paul (宝瑠) Menage
2007-07-17 17:53                 ` Paul Jackson
2007-07-17 17:55                   ` Paul (宝瑠) Menage
2007-07-17 17:58                     ` Paul Jackson

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