All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: udev in containers
Date: Fri, 28 Jan 2011 12:18:47 -0800	[thread overview]
Message-ID: <m1pqrgvl20.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20110128144827.GA4981@localhost> (Serge E. Hallyn's message of "Fri, 28 Jan 2011 08:48:27 -0600")

"Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes:

> Hi,
>
> Now that we are allowing udev to run in containers, Daniel has
> noticed that updates to sysfs uevent files will trigger a flurry
> of activity in all containers on the host.  While not a problem
> with just a few containers, this can severaly impact performance
> with hundreds or more containers.
>
> (Daniel, would it be possible for you to get some measurements
> on host and in a container versus # of active containers, with
> and without udev?  Do you have a otehrwise unused machien you
> could try that on?)
>
> Is there anything we can/should do about this?
>
> Two approaches, neither sufficiently thought out yet, would be
> to generalize the directory tagging currently used for
> /sys/class/net, and full-fledged implementation of a device
> namespace.
>
> The directory tagging would probably only work if we can assign
> multiple tags to a device, but we could for instance make
> /sys/block tagged, and really no container probably needs to see
> /sys/block/sda.
>
> The device namespace would be similar, except I suspect it
> would not only hide certain devices from certain namespaces,
> but it would actually virtualize the device major:minor
> mapping, for checkpoint/restart, so that /dev/sda could be
> redirected to another device more completely than simply
> fudging the nodes under /dev.
>
> Comments?  Designs?  Plans?

To answer you earlier question: What did I expect the device namespace
to look like.

- Only purely virtual devices like  /dev/pts, /dev/null, /dev/nbd and /dev/loop0 present.
- Fully virtualized major/minor look up preventing us from even talking
  about devices in other namespaces.
- Support from the user/security namespace so that mknod and mount are safe.

I get a certain uncomfortable feeling about mknod and mount running free
in a container without restrictions that make container without restrictions...

Eric

  reply	other threads:[~2011-01-28 20:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 14:48 udev in containers Serge E. Hallyn
2011-01-28 20:18 ` Eric W. Biederman [this message]
     [not found]   ` <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-01-28 20:46     ` Serge E. Hallyn
2011-01-28 22:11     ` Oren Laadan

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=m1pqrgvl20.fsf@fess.ebiederm.org \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
    --cc=serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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 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.