mtdram max size

Tiago Maluta tiago.maluta at gmail.com
Tue Aug 18 00:24:31 EDT 2009


Hi,

I'm searching a way to create a mtdram block device with large sizes
(> 150MB). Ranging some values to 'total_size' parameter I found a
boundary of approx. 110MB. I tried to fix looking at __vmalloc_node()
putting some "poor" debug  printk() in order to see something:


# modprobe mtdram total_size=120000

[  161.664200] -- tm -- __vmalloc_node() num_physpages: 784080 size:
8192 PAGE_SHIFT: 12
[  161.664733] -- tm -- mtdram.c init_mtdram(void)
[  161.664737] -- tm -- __vmalloc_node() num_physpages: 784080 size:
122880000 PAGE_SHIFT: 12
[  161.664751] vmap allocation for size 122884096 failed: use
vmalloc=<size> to increase size.

If I pass vmalloc size on

# modprobe mtdram total_size=110000

[  166.026400] -- tm -- __vmalloc_node() num_physpages: 784080 size:
8192 PAGE_SHIFT: 12
[  166.026748] -- tm -- mtdram.c init_mtdram(void)
[  166.026752] -- tm -- __vmalloc_node() num_physpages: 784080 size:
112640000 PAGE_SHIFT: 12
[  166.026764] -- tm -- __vmalloc_node() num_physpages: 784080 size:
110592 PAGE_SHIFT: 12

# rmmod mtdram

[  172.218498] -- tm -- mtdram.c cleanup_mtdram(void)

Other information:

$ uname -r
2.6.31-rc6-maluta-00043-g894ef82-dirty

# cat /proc/meminfo | grep Vmalloc
MemTotal:        3104428 kB
(...)
VmallocTotal:        122880 kB
VmallocUsed:       11692 kB
VmallocChunk:      77884 kB



More information about the linux-mtd mailing list