public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Paul Menage <menage@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>,
	Pavel Emelianov <xemul@sw.ru>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.osdl.org>,
	Paul Jackson <pj@sgi.com>
Subject: Containers: css_put() dilemma
Date: Tue, 17 Jul 2007 00:20:40 +0530	[thread overview]
Message-ID: <469BBE00.8000709@linux.vnet.ibm.com> (raw)

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

             reply	other threads:[~2007-07-16 18:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 18:50 Balbir Singh [this message]
2007-07-16 19:03 ` Containers: css_put() dilemma 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=469BBE00.8000709@linux.vnet.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=pj@sgi.com \
    --cc=serue@us.ibm.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=vatsa@in.ibm.com \
    --cc=xemul@sw.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox