内核4.12中CONFIG_CGROUPS的意义是什么?

时间:2019-07-17 00:52:26

标签: linux-kernel embedded-linux

我有一个具有Power pc体系结构87xx的嵌入式系统。如果我未在Linux内核中启用“ CONFIG_CGROUPS”,则无法安装devtmpf(即ubifs)文件系统。我试图了解CGROUPS在安装运行UBIFS的nand文件系统中的依赖性是什么。如果启用CGROUPS那么我将无法执行已挂载的根文件系统的/ sbin / init。我在这里可能做错了什么?

如果我在内核中打开CONFIG_CGROUPS = y,则会发生这种情况。

    Zone ranges:
  DMA      [mem 0x0000000000000000-0x000000001fffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: ubi.mtd=1 rootfstype=ubifs root=ubi0:discofs rw console=tty                                                                                                                                                             S1,115200 serno=91101316 sku=700064090C hwrev==00:90:5E:12:32:05 mac1=00:90:5E:1                                                                                                                                                             2:32:06 mac2=00:90:5E:12:32:07 mac3=00:90:5E:12:32:08 mac4=00:90:5E:12:32:09
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 511944K/524288K available (5972K kernel code, 272K rwdata, 1192K rodata,                                                                                                                                                              192K init, 128K bss, 12344K reserved, 0K cma-reserved)
Kernel virtual memory layout:
  * 0xfffdf000..0xfffff000  : fixmap
  * 0xfdffe000..0xfe000000  : early ioremap
  * 0xe1000000..0xfdffe000  : vmalloc & ioremap
NR_IRQS:512 nr_irqs:512 16
IPIC (128 IRQ sources) at e1000700
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x12049cd416, max_id                                                                                                                                                             le_ns: 440795202745 ns
clocksource: timebase mult[ccccccd] shift[24] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645                                                                                                                                                             041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16

PCI: Probing PCI hardware
Freescale Elo series DMA driver
vgaarb: loaded
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@l                                                                                                                                                             inux.it>
PTP clock support registered
clocksource: Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
fsl-elo-dma e00082a8.dma: #0 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #1 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #2 (fsl,elo-dma-channel), irq 71
fsl-elo-dma e00082a8.dma: #3 (fsl,elo-dma-channel), irq 71
workingset: timestamp_bits=30 max_order=17 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
SGI XFS with security attributes, no debug enabled
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Oops: Exception in kernel mode, sig: 4 [#1]
disco
Modules linked in:
CPU: 0 PID: 8 Comm: kdevtmpfs Not tainted 4.12.28-disco-standard #1
task: df41b580 task.stack: df438000
NIP: c0100000 LR: c00fb708 CTR: c00b462c
REGS: df439c50 TRAP: 0700   Not tainted  (4.12.28-disco-standard)
MSR: 00089032 <EE,ME,IR,DR,RI>
  CR: 880ad872  XER: 00000000

GPR00: c00fb708 df439d00 df41b580 df69c170 00000000 df69c170 00000002 00000000
GPR08: 00000000 00000007 00000001 0e4e1c2f 280ad872 00000000 c0040514 df41d120
GPR16: 00000000 014000c0 00000007 00000000 00000000 0000002f 00000000 c078c840
GPR24: fffff000 00000000 00000000 df69c1cc df69c170 df41fd18 00000000 df69c170
NIP [c0100000] iput+0x24/0x1c8
LR [c00fb708] d_delete+0xb8/0xfc
Call Trace:
[df439d00] [c00fb000] dentry_unlink_inode+0xf0/0x164 (unreliable)
[df439d20] [c00fb708] d_delete+0xb8/0xfc
[df439d40] [c00eecc4] vfs_unlink+0x1b8/0x210
[df439d70] [c03c4f2c] handle_remove+0x1b0/0x324
[df439e50] [c03c5200] devtmpfsd+0x160/0x34c
[df439f00] [c0040650] kthread+0x13c/0x140
[df439f40] [c00103f0] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
39200001 7d234b78 4e800020 9421ffe0 93e1001c 7c7f1b79 41820094 7c0802a6
93a10014 90010024 93c10018 813f0058 <27051956> 9188a4bd 5d2e9c29 0039c48b
---[ end trace df78166105247941 ]---

1 个答案:

答案 0 :(得分:0)

我的猜测是您有一个基于systemd的系统。在这种情况下,init是由systemd提供的,/ dev的填充也是如此。反过来,Systemd则大量使用CGROUPS。

IMO不是ubifs / devtmpfs链接。只要正确填充了/ dev,就可以不使用ubifs。