[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#813616: linux-image-3.16: namespaces: the syscall setns() is too slow



Package: src:linux
Version: 3.16.7-ckt11-1+deb8u6
Severity: important
Tags: patch

Dear Maintainer,

These upstream patches are missing:
3d93116cef30 fs/proc_namespace.c: simplify testing nsp and nsp->mnt_ns
728dba3a39c6 namespaces: Use task_lock and not rcu to protect nsproxy

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3d93116cef30
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=728dba3a39c6

With a vanilla 3.10 kernel, I use this commands to show the problem (on a machine with 4 cores):
ip netns add foo
ip netns add bar
for i in `seq 0 1000` ; do echo -e 'netns exec foo echo\nnetns exec bar echo' >> ipnetns.batch ; done
time ip -b ipnetns.batch > /dev/null


Without the above patches:
real    0m27.831s
user    0m0.448s
sys     0m1.080s
With the above patches:
real    0m1.448s
user    0m0.045s
sys     0m0.172s

With my debian-8:
$ uname -a
Linux dut-vm 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux
$ time ip -b ipnetns.batch > /dev/null

real    1m52.559s
user    0m0.000s
sys     0m0.568s

Regards,
Nicolas

-- Package-specific info:
** Version:
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)

** Command line:
BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/6WIND-debian8 ro console=ttyS0,115200n8 quiet

** Not tainted

** Kernel log:
[    0.310896] intel_idle: does not run on family 6 model 60
[    0.310917] GHES: HEST is not enabled!
[    0.310983] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.332795] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.354613] 00:06: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    0.354855] Linux agpgart interface v0.103
[    0.354944] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    0.355392] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.355395] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.355571] mousedev: PS/2 mouse device common for all mice
[    0.355724] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.355856] rtc_cmos 00:00: RTC can wake from S4
[    0.356054] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[    0.356129] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram, hpet irqs
[    0.356139] ledtrig-cpu: registered to indicate activity on CPUs
[    0.356184] AMD IOMMUv2 driver by Joerg Roedel <joerg.roedel@amd.com>
[    0.356185] AMD IOMMUv2 functionality not available on this system
[    0.356237] TCP: cubic registered
[    0.356323] NET: Registered protocol family 10
[    0.356504] mip6: Mobile IPv6
[    0.356507] NET: Registered protocol family 17
[    0.356511] mpls_gso: MPLS GSO support
[    0.356742] registered taskstats version 1
[    0.357002] rtc_cmos 00:00: setting system clock to 2016-02-03 17:53:47 UTC (1454522027)
[    0.357051] PM: Hibernation image not present or could not be loaded.
[    0.357746] Freeing unused kernel memory: 1204K (ffffffff818ee000 - ffffffff81a1b000)
[    0.357747] Write protecting the kernel read-only data: 8192k
[    0.359105] Freeing unused kernel memory: 924K (ffff880001519000 - ffff880001600000)
[    0.359466] Freeing unused kernel memory: 216K (ffff8800017ca000 - ffff880001800000)
[    0.367115] systemd-udevd[65]: starting version 215
[    0.367400] random: systemd-udevd urandom read with 1 bits of entropy available
[    0.375408] SCSI subsystem initialized
[    0.375856] Floppy drive(s): fd0 is 1.44M
[    0.381628] libata version 3.00 loaded.
[    0.392329] FDC 0 is a S82078B
[    0.392519] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[    0.393063] ata_piix 0000:00:01.1: version 2.13
[    0.393673] virtio-pci 0000:00:03.0: irq 40 for MSI/MSI-X
[    0.393684] virtio-pci 0000:00:03.0: irq 41 for MSI/MSI-X
[    0.393693] virtio-pci 0000:00:03.0: irq 42 for MSI/MSI-X
[    0.393952] scsi0 : ata_piix
[    0.394082] scsi1 : ata_piix
[    0.394119] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc020 irq 14
[    0.394120] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc028 irq 15
[    0.548516] ata1.01: NODEV after polling detection
[    0.548706] ata2.01: NODEV after polling detection
[    0.549034] ata1.00: ATA-7: QEMU HARDDISK, 2.3.0, max UDMA/100
[    0.549037] ata1.00: 62914560 sectors, multi 16: LBA48 
[    0.549175] ata2.00: ATAPI: QEMU DVD-ROM, 2.3.0, max UDMA/100
[    0.549718] ata1.00: configured for MWDMA2
[    0.549834] ata2.00: configured for MWDMA2
[    0.549925] scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    0    PQ: 0 ANSI: 5
[    0.550636] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.3. PQ: 0 ANSI: 5
[    0.555571] sd 0:0:0:0: [sda] 62914560 512-byte logical blocks: (32.2 GB/30.0 GiB)
[    0.555611] sd 0:0:0:0: [sda] Write Protect is off
[    0.555613] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.555624] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.556553]  sda: sda1
[    0.556744] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.564726] sr0: scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[    0.564730] cdrom: Uniform CD-ROM driver Revision: 3.20
[    0.564961] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    0.565941] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    0.566136] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    0.625628] device-mapper: uevent: version 1.0.3
[    0.625762] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com
[    0.740894] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[    1.304578] tsc: Refined TSC clocksource calibration: 3200.085 MHz
[    1.971075] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[    2.147725] fuse init (API version 7.23)
[    2.318331] random: nonblocking pool is initialized
[    2.441112] systemd-udevd[176]: starting version 215
[    2.460290] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
[    2.608094] systemd-udevd[191]: renamed network interface eth0 to mgmt0
[    2.611100] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    2.611105] ACPI: Power Button [PWRF]
[    2.692906] parport_pc 00:04: reported by Plug and Play ACPI
[    2.693000] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[    2.786415] ppdev: user-space parallel port driver
[    2.819493] input: PC Speaker as /devices/platform/pcspkr/input/input3
[    2.856298] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0x700, revision 0
[    2.866458] AVX2 version of gcm_enc/dec engaged.
[    2.868085] alg: No test for __gcm-aes-aesni (__driver-gcm-aes-aesni)
[    2.894104] alg: No test for crc32 (crc32-pclmul)
[    2.895854] intel_rapl: no valid rapl domains found in package 0
[    2.925476] intel_rapl: no valid rapl domains found in package 0
[    2.936374] intel_rapl: no valid rapl domains found in package 0
[    3.669263] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4
[    3.850667] FS-Cache: Loaded
[    3.878049] RPC: Registered named UNIX socket transport module.
[    3.878051] RPC: Registered udp transport module.
[    3.878052] RPC: Registered tcp transport module.
[    3.878052] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.896883] FS-Cache: Netfs 'nfs' registered for caching
[    3.909407] Key type dns_resolver registered
[    3.915331] NFS: Registering the id_resolver key type
[    3.915337] Key type id_resolver registered
[    3.915338] Key type id_legacy registered
[    4.099927] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    4.132816] systemd-journald[170]: Received request to flush runtime journal from PID 1

** Model information
sys_vendor: QEMU
product_name: Standard PC (i440FX + PIIX, 1996)
product_version: pc-i440fx-2.3
chassis_vendor: QEMU
chassis_version: pc-i440fx-2.3
bios_vendor: SeaBIOS
bios_version: rel-1.8.1-0-g4adadbd-20150316_085822-nilsson.home.kraxel.org

** Loaded modules:
nfsv3
nfsd
nfs_acl
rpcsec_gss_krb5
auth_rpcgss
oid_registry
nfsv4
dns_resolver
nfs
lockd
sunrpc
fscache
crc32_pclmul
ghash_clmulni_intel
aesni_intel
evdev
i2c_piix4
psmouse
serio_raw
pcspkr
ppdev
aes_x86_64
lrw
i2c_core
parport_pc
parport
processor
thermal_sys
gf128mul
glue_helper
ablk_helper
button
cryptd
fuse
autofs4
ext4
crc16
mbcache
jbd2
dm_mod
sg
sd_mod
crc_t10dif
crct10dif_generic
sr_mod
cdrom
ata_generic
virtio_net
ata_piix
crct10dif_pclmul
crct10dif_common
crc32c_intel
virtio_pci
virtio_ring
virtio
libata
floppy
scsi_mod

** PCI devices:
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237] (rev 02)
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:01.1 IDE interface [0101]: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] [8086:7010] (prog-if 80 [Master])
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable)
	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable)
	Region 4: I/O ports at c020 [size=16]
	Kernel driver in use: ata_piix

00:01.3 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 03)
	Subsystem: Red Hat, Inc Qemu virtual machine [1af4:1100]
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 9
	Kernel driver in use: piix4_smbus

00:03.0 Ethernet controller [0200]: Red Hat, Inc Virtio network device [1af4:1000]
	Subsystem: Red Hat, Inc Device [1af4:0001]
	Physical Slot: 3
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c000 [size=32]
	Region 1: Memory at febc0000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at feb80000 [disabled] [size=256K]
	Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci


** USB devices:
not available


-- System Information:
Debian Release: 8.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages linux-image-3.16.0-4-amd64 depends on:
ii  debconf [debconf-2.0]                   1.5.56
ii  initramfs-tools [linux-initramfs-tool]  0.120
ii  kmod                                    18-3
ii  linux-base                              3.5

Versions of packages linux-image-3.16.0-4-amd64 recommends:
pn  firmware-linux-free  <none>
pn  irqbalance           <none>

Versions of packages linux-image-3.16.0-4-amd64 suggests:
pn  debian-kernel-handbook  <none>
ii  grub-pc                 2.02~beta2-22
pn  linux-doc-3.16          <none>

Versions of packages linux-image-3.16.0-4-amd64 is related to:
pn  firmware-atheros        <none>
pn  firmware-bnx2           <none>
pn  firmware-bnx2x          <none>
pn  firmware-brcm80211      <none>
pn  firmware-intelwimax     <none>
pn  firmware-ipw2x00        <none>
pn  firmware-ivtv           <none>
pn  firmware-iwlwifi        <none>
pn  firmware-libertas       <none>
pn  firmware-linux          <none>
pn  firmware-linux-nonfree  <none>
pn  firmware-myricom        <none>
pn  firmware-netxen         <none>
pn  firmware-qlogic         <none>
pn  firmware-ralink         <none>
pn  firmware-realtek        <none>
pn  xen-hypervisor          <none>

-- debconf information:
  linux-image-3.16.0-4-amd64/postinst/mips-initrd-3.16.0-4-amd64:
  linux-image-3.16.0-4-amd64/prerm/removing-running-kernel-3.16.0-4-amd64: true
  linux-image-3.16.0-4-amd64/postinst/depmod-error-initrd-3.16.0-4-amd64: false


Reply to: