2

I have a requirement to allocate 128K memory of 4K aligned of 64 chunks. Currentyl using pci_alloc_consistent() as allocated phy_addr needs to have DMA capability. When i do this, i get the below warning message. Does this mean my request failed?

------------[ cut here ]------------
WARNING: at mm/page_alloc.c:2045 __alloc_pages_nodemask+0x8d9/0x940() (Tainted: P           ----------------  )
Hardware name: ProLiant DL165 G5
Modules linked in: vgchal(P+)(U) vgcport(P)(U) autofs4 sunrpc cpufreq_ondemand powernow_k8 freq_table mperf ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 uinput tg3 vgcinit(P)(U) vgcdebug(P)(U) sg microcode k10temp amd64_edac_mod edac_core edac_mce_amd i2c_piix4 i2c_core shpchp ext3 jbd mbcache hpsa cciss sr_mod cdrom ata_generic pata_acpi pata_serverworks sata_svw dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
Pid: 2448, comm: insmod Tainted: P           ----------------   2.6.32-220.el6.x86_64 #1
Call Trace:
[<ffffffff81069b77>] ? warn_slowpath_common+0x87/0xc0
[<ffffffff81069bca>] ? warn_slowpath_null+0x1a/0x20
[<ffffffff81124069>] ? __alloc_pages_nodemask+0x8d9/0x940
[<ffffffff81147fc9>] ? vmap_page_range_noflush+0x279/0x370
[<ffffffff811474da>] ? __insert_vmap_area+0x7a/0xd0
[<ffffffff81010f46>] ? dma_generic_alloc_coherent+0xa6/0x160
[<ffffffff8103bb89>] ? gart_alloc_coherent+0x49/0x140
[<ffffffffa00ee5e5>] ? dbh_hal_init+0x105/0x410 [vgchal]
[<ffffffffa00ee805>] ? dbh_hal_init+0x325/0x410 [vgchal]
[<ffffffffa0113095>] ? hal_module_init+0x95/0xa0 [vgchal]
[<ffffffff81096e75>] ? __blocking_notifier_call_chain+0x65/0x80
[<ffffffffa0113000>] ? hal_module_init+0x0/0xa0 [vgchal]
[<ffffffff8100204c>] ? do_one_initcall+0x3c/0x1d0
[<ffffffff810af641>] ? sys_init_module+0xe1/0x250
[<ffffffff8100b0f2>] ? system_call_fastpath+0x16/0x1b

As i read, pci_alloc_consistent() should be able to allocate more than 128K memory but couldn't find what is the max it can do. Please let me know what is going wrong here.

Regexident
  • 29,441
  • 10
  • 93
  • 100
pkumarn
  • 1,383
  • 4
  • 22
  • 29
  • Please specify the version of the kernel. It will be easier to find that warning in the kernel sources this way and see what is going on. – Eugene May 25 '13 at 08:53
  • My kernel version where it is run is 2.6.32-71.el6.x86_64. Does this tell pci_alloc_consistent() failed ? – pkumarn May 26 '13 at 10:11
  • IIRC, pci_alloc_consistent() should return NULL if it fails. The warning could be about something else. Unfortunately, I do not have the sources for that very kernel at hand and the vanilla kernel 2.6.32 seems to be different from yours. – Eugene May 27 '13 at 08:16
  • The closest warning I can see is in __alloc_pages_slowpath (http://lxr.free-electrons.com/source/mm/page_alloc.c#L2386) which is called from __alloc_pages_nodemask(). It is emitted if too much memory is requested. But I am not sure if it is the case in your system: 128 K is not that much. – Eugene May 27 '13 at 08:24
  • Thanks folks for the answers. If this is warning for too much memory allocation, i was expecting it to fail. – pkumarn May 27 '13 at 11:23

1 Answers1

0

I'd also recommend a kernel upgrade, if possible.

2.6.32-220.el6 was the initial (buggy) kernel release shipped with RHEL 6.2 (which has been superseded by EL6.3 and 6.4). If you can, try to move to the last release of the 6.2 kernel, kernel-2.6.32-220.23.1.el6,assuming you need to remain on the 6.2 OS release.

ewwhite
  • 435
  • 2
  • 13