From: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Cc: Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
"Denis V. Lunev" <den-3ImXcnM4P+0@public.gmane.org>,
Linux Containers
<containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
"Denis V. Lunev" <den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Benjamin Thery <benjamin.thery-6ktuUTfB/bM@public.gmane.org>
Subject: Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
Date: Fri, 09 Nov 2007 13:14:32 +0300 [thread overview]
Message-ID: <47343308.1050604@openvz.org> (raw)
In-Reply-To: <473318A0.7010509-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Daniel Lezcano wrote:
> Pavel Emelyanov wrote:
>> Daniel Lezcano wrote:
>>> Denis V. Lunev wrote:
>>> > Daniel Lezcano wrote:
>>> >> Denis V. Lunev wrote:
>>> >>> Daniel Lezcano wrote:
>>> >>>
>>> >>>> * the first one is the locking of the network namespace list by
>>> >>>> rtnl_lock, so from the timer callback we can not browse the network
>>> >>>> namespace list to check the age of the routes. It is a problem I would
>>> >>>> like to talk with Denis if he has time
>>> >>> From my point of view, the situation is clear. The timer should be
>>> >>> per/namespace. The situation is completely different as one in IPv4.
>>> >> We thought to make a timer per namespace for ipv6, but we are a little
>>> >> afraid for the performances when there will be a lot of containers.
>>> >> Anyway, we can do a timer per namespace and optimize that later. I will
>>> >> cook a new patch to take into account that for the next week.
>>> >
>>> > IMHO not a problem. tcp_write_timer is per/socket timer. If this works
>>> > efficiently, per/namespace one will work also.
>>>
>>> That's right, this is a good argument. By the way, the amount of work to
>>> be done in the tcp_write_timer is perhaps smaller than the one done in
>>> the ipv6 routing age check, no ? Anyway, I'm not against a timer per
>>> namespace in this case, I already did a try before rolling back to a
>>> for_each_net in the gc timer, that changes a little the API, but nothing
>> We can easily make the netns list rcu protected to address this issue.
>> If you're interested, I can prepare a patch tomorrow.
>
> Sure, I'm interested :)
>
> Benjamin and I, we thought about using a rcu to avoid to use a timer per
> namespace in ipv6 but we faced to the problem with rtnl_unlock function
> when the network namespace is protected with the rtnl_lock/rtnl_unlock.
> In the function rtnl_unlock (not the one in net-2.6 but the one which is
> in netns49), there is loop, for_each_net, in this loop, we do
> rtnl_unlock, call sk_data_ready and take the lock again. If we are in
> rcu protected model, this loop will take a lock (one time just before
> sk_data_ready and one time in the sk_data_ready function). As far as I
> understand with rcu, we should not block inside a rcu_read_lock, right ?
Right. I will look at it. I think that if we protect the list with RCU
the rtnl_lock() protection will be not needed any longer.
Thanks,
Pavel
next prev parent reply other threads:[~2007-11-09 10:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <472AE42F.5000602@openvz.org>
[not found] ` <472AE42F.5000602-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-04 4:06 ` Pid namespaces problems Eric W. Biederman
[not found] ` <m1640id57r.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-11-06 7:39 ` Pavel Emelyanov
[not found] ` <47301A14.9040304-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-06 16:28 ` Eric W. Biederman
2007-11-07 8:28 ` Cedric Le Goater
[not found] ` <4731772D.3060806-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-07 8:18 ` Daniel Lezcano
2007-11-07 9:00 ` Daniel Lezcano
[not found] ` <47317EA7.6030500-GANU6spQydw@public.gmane.org>
2007-11-07 16:12 ` Pavel Emelyanov
[not found] ` <4731E3DE.6000501-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-07 17:24 ` Daniel Lezcano
[not found] ` <4731F4BC.4000203-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-08 10:40 ` Pavel Emelyanov
[not found] ` <4732E7A5.6050703-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-08 11:07 ` Daniel Lezcano
2007-11-08 10:53 ` Denis V. Lunev
[not found] ` <4732EA8E.7080400-3ImXcnM4P+0@public.gmane.org>
2007-11-08 13:29 ` Daniel Lezcano
[not found] ` <47330F1F.4080806-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-08 13:37 ` Pavel Emelyanov
[not found] ` <47331122.3000304-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-08 13:42 ` net namespace plans for 2.6.25 (was Re: Pid namespaces problems) Cedric Le Goater
[not found] ` <47331241.2090501-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-08 13:45 ` Daniel Lezcano
[not found] ` <473312FD.5030609-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-08 13:58 ` Pavel Emelyanov
[not found] ` <473315F5.20608-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-11-08 14:08 ` Benjamin Thery
2007-11-08 14:09 ` Daniel Lezcano
[not found] ` <473318A0.7010509-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-11-09 10:14 ` Pavel Emelyanov [this message]
2007-11-08 14:05 ` Denis V. Lunev
[not found] ` <473317A2.2020307-3ImXcnM4P+0@public.gmane.org>
2007-11-08 14:00 ` Daniel Lezcano
2007-11-08 13:43 ` Pid namespaces problems Denis V. Lunev
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=47343308.1050604@openvz.org \
--to=xemul-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
--cc=benjamin.thery-6ktuUTfB/bM@public.gmane.org \
--cc=clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=den-3ImXcnM4P+0@public.gmane.org \
--cc=den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox