About Out of memory

Questions and discussions about the Xillybus IP core and drivers

About Out of memory

Postby phdwong »

Hi
I diy a new zynq board, and the DDR size is 128MB(1024Mbits)

when I move the Xillybus DMA Project from zybo(and in this platform,the work is right), and change the uboot parameter about the ddr

when OS running , the log shows Out of memory, when turn off the DMA from device tree, the OS is running OK

the log is :


U-Boot 2014.01 (Jul 14 2019 - 07:45:29)

I2C: ready
Memory: ECC disabled
DRAM: 128 MiB
MMC: zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
Device: zynq_sdhci
Manufacturer ID: 12
OEM: 3456
Name: MS
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
reading uEnv.txt
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
4079368 bytes read in 359 ms (10.8 MiB/s)
reading devicetree.dtb
8799 bytes read in 17 ms (504.9 KiB/s)
reading uramdisk.image.gz
12424997 bytes read in 1060 ms (11.2 MiB/s)
## Booting kernel from Legacy Image at 03000000 ...
Image Name: Linux-3.17.0-xilinx
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4079304 Bytes = 3.9 MiB
Load Address: 00100000
Entry Point: 00100000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 12424933 Bytes = 11.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02f00000
Booting using the fdt blob at 0x2f00000
Loading Kernel Image ... OK
Loading Ramdisk to 06f56000, end 07b2f6e5 ... OK
Loading Device Tree to 06f50000, end 06f5525e ... OK

Starting kernel ...

..................................................................................................................
..................................................................................................................
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 80
zynq-edac f8006000.ps7-ddrc: ecc not enabled
cpufreq_cpu0: failed to get cpu0 regulator: -19
cpufreq: __cpufreq_add_dev: CPU0: Running at unlisted freq: 649999 KHz
cpufreq: __cpufreq_add_dev: CPU0: Unlisted initial frequency changed to: 650000 KHz
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-arasan e0100000.ps7-sdio: No vmmc regulator found
sdhci-arasan e0100000.ps7-sdio: No vqmmc regulator found
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
sdhci-arasan e0101000.ps7-sdio: No vmmc regulator found
sdhci-arasan e0101000.ps7-sdio: No vqmmc regulator found
mmc0: new high speed SDHC card at address 59b4
mmc1: SDHCI controller on e0101000.ps7-sdio [e0101000.ps7-sdio] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmcblk0: mmc0:59b4 MS 7.51 GiB
mmcblk0: p1 p2
xillybus_of 50000000.xillybus_ip: Created 3 device files.
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
lib80211: common routines for IEEE802.11 drivers
..................................................................................................................
..................................................................................................................
RAMDISK: gzip image found at block 0
swapper/0 invoked oom-killer: gfp_mask=0x10200d0, order=0, oom_score_adj=0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-xilinx #26
[<40014658>] (unwind_backtrace) from [<40010d14>] (show_stack+0x10/0x14)
[<40010d14>] (show_stack) from [<405465a0>] (dump_stack+0x84/0xc8)
[<405465a0>] (dump_stack) from [<405449d8>] (dump_header.isra.11+0x64/0x17c)
[<405449d8>] (dump_header.isra.11) from [<40084090>] (out_of_memory+0x288/0x2f4)
[<40084090>] (out_of_memory) from [<40087100>] (__alloc_pages_nodemask+0x600/0x65c)
[<40087100>] (__alloc_pages_nodemask) from [<400816f8>] (pagecache_get_page+0xfc/0x160)
[<400816f8>] (pagecache_get_page) from [<40081944>] (grab_cache_page_write_begin+0x24/0x3c)
[<40081944>] (grab_cache_page_write_begin) from [<400dbc0c>] (block_write_begin+0x1c/0x74)
[<400dbc0c>] (block_write_begin) from [<40080f0c>] (generic_perform_write+0xa0/0x1b4)
[<40080f0c>] (generic_perform_write) from [<400828f0>] (__generic_file_write_iter+0x308/0x378)
[<400828f0>] (__generic_file_write_iter) from [<400dddf4>] (blkdev_write_iter+0x28/0xb0)
[<400dddf4>] (blkdev_write_iter) from [<400b4f70>] (new_sync_write+0x7c/0xa0)
[<400b4f70>] (new_sync_write) from [<400b55f4>] (vfs_write+0xb8/0x170)
[<400b55f4>] (vfs_write) from [<400b5b30>] (SyS_write+0x40/0x80)
[<400b5b30>] (SyS_write) from [<4074b5fc>] (compr_flush+0x20/0x60)
[<4074b5fc>] (compr_flush) from [<4075d558>] (gunzip+0x254/0x31c)
[<4075d558>] (gunzip) from [<4074b90c>] (rd_load_image+0x2d0/0x590)
[<4074b90c>] (rd_load_image) from [<4074bccc>] (initrd_load+0x38/0x2d4)
[<4074bccc>] (initrd_load) from [<4074b39c>] (prepare_namespace+0xc0/0x1b8)
[<4074b39c>] (prepare_namespace) from [<4074ad0c>] (kernel_init_freeable+0x180/0x1c8)
[<4074ad0c>] (kernel_init_freeable) from [<40543290>] (kernel_init+0x8/0xe4)
[<40543290>] (kernel_init) from [<4000dc78>] (ret_from_fork+0x14/0x3c)
Mem-info:
Normal per-cpu:
CPU 0: hi: 18, btch: 3 usd: 2
CPU 1: hi: 18, btch: 3 usd: 15
active_anon:0 inactive_anon:0 isolated_anon:0
active_file:0 inactive_file:0 isolated_file:0
unevictable:3033 dirty:7 writeback:1 unstable:0
free:4375 slab_reclaimable:77 slab_unreclaimable:988
mapped:0 shmem:0 pagetables:0 bounce:0
free_cma:4027
Normal free:17500kB min:1392kB low:1740kB high:2088kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:12132kB isolated(anon):0kB isolated(file):0kB present:131072kB managed:121612kB mlocked:0kB dirty:28kB writeback:4kB mapped:0kB shmem:0kB slab_reclaimable:308kB slab_unreclaimable:3952kB kernel_stack:376kB pagetables:0kB unstable:0kB bounce:0kB free_cma:16108kB writeback_tmp:0kB pages_scanned:12 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0
Normal: 2*4kB (RC) 1*8kB (C) 1*16kB (R) 2*32kB (RC) 2*64kB (RC) 1*128kB (C) 1*256kB (R) 1*512kB (C) 2*1024kB (RC) 1*2048kB (C) 3*4096kB (C) = 17504kB
3044 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
32768 pages of RAM
20315 free pages
2365 reserved pages
911 slab pages
264060 pages shared
0 pages swap cached
[ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
Kernel panic - not syncing: Out of memory and no killable processes...

CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.17.0-xilinx #26
[<40014658>] (unwind_backtrace) from [<40010d14>] (show_stack+0x10/0x14)
[<40010d14>] (show_stack) from [<405465a0>] (dump_stack+0x84/0xc8)
[<405465a0>] (dump_stack) from [<40013028>] (ipi_cpu_stop+0x3c/0x6c)
[<40013028>] (ipi_cpu_stop) from [<4001361c>] (handle_IPI+0x64/0x84)
[<4001361c>] (handle_IPI) from [<40008560>] (gic_handle_irq+0x58/0x60)
[<40008560>] (gic_handle_irq) from [<400116c0>] (__irq_svc+0x40/0x74)
Exception stack(0x45877f80 to 0x45877fc8)
7f80: 9b60e372 00000000 9b60e372 00000000 47ee0f30 00000001 8fc2e2a6 00000000
7fa0: 407b7850 407b7850 00000001 45876000 00000008 45877fc8 4005e20c 403f0cc0
7fc0: 90000113 ffffffff
[<400116c0>] (__irq_svc) from [<403f0cc0>] (cpuidle_enter_state+0x4c/0xc4)
[<403f0cc0>] (cpuidle_enter_state) from [<40048690>] (cpu_startup_entry+0x158/0x1c4)
[<40048690>] (cpu_startup_entry) from [<00008604>] (0x8604)
---[ end Kernel panic - not syncing: Out of memory and no killable processes...

random: nonblocking pool is initialized

..................................................................................................................
.............................................................................................................
phdwong
 
Posts: 2
Joined:

Re: About Out of memory

Postby support »

Hello,

The Xillybus IP core allocates memory for its DMA buffers when it's loaded, and as you noted, that happens before the RAM disk image is loaded. It seems like there's not enough memory left for the latter on a board with 128 MB.

The size of the DMA buffers can be reduced in the IP core factory, directly (if "Autoset Internals" is turned off, by reducing their size or count) or indirectly (by reducing the buffering time). This will, of course, reduce the tolerance to software latencies, if you're using Xillybus for data acquisition or playback. So it's up to you.

Alternatively, you can mount root from the SD card rather than using a RAM disk. It's actually quite pointless to use a RAM disk on a system with a large SD card, in particular when you're tight with RAM. If you uncompress the RAM disk image into an ext4 partition on the SD card and change the kernel's boot parameters to mount root from that partition, you'll get roughly the same result (except that you get a persistent file system, so you must shut down the system properly each time).

Regards,
Eli
support
 
Posts: 802
Joined:


Return to Xillybus

cron