[Bhanu Prakash Gollapudi wrote:] > On 2/23/2012 10:08 AM, Clark, Steven wrote: > > I am seeing a failure in fcoe_transport_create on a 64-bit single-CPU > > environment (I'm testing in a VM with one CPU > assigned). > > The size in the call to __alloc_percpu() is greater than the max of 32K > > because it allocates 4K pointers + header across all > CPUs. > > Reducing FCOE_MAX_ID from 0x0FFF to 0x0F7F fixes the problem at the expense > > of 0x80 fewer allowed open > exchanges. > > I can prepare a patch for that, but maybe someone knowledgeable can suggest > > a better fix. > > One way to fix is to use smaller XID range based on nr_cpu_ids. >
Looks like FCP should be seeing this same issue since it also allocates 4K exchanges: #define FCPIO_HOST_EXCH_RANGE_START 0x1000 #define FCPIO_HOST_EXCH_RANGE_END 0x1fff So the right way to fix is what you suggest. fc_exch_mgr_alloc is already adjusting the allocation based on the number of cpus so can do this as a special case. I'll try that out and prepare a patch. > > > > stack trace is below: > > > > [ 123.041704] WARNING: at mm/percpu.c:716 pcpu_alloc+0x9e1/0x9f0() > > [ 123.041706] Hardware name: Bochs > > [ 123.041708] illegal size (32832) or align (64) for percpu allocation > > [ 123.041709] Modules linked in: fuse raid0 fcoe libfcoe 8021q garp stp > > llc libfc scsi_transport_fc scsi_tgt joydev ixgbe > floppy ppdev parport_pc parport sym53c8xx microcode 8139too > scsi_transport_spi i2c_piix4 i2c_core dca mdio 8139cp > pcspkr mii uinput [last unloaded: scsi_wait_scan] > > [ 123.041733] Pid: 1530, comm: tgt_startup.sh Not tainted 3.2.0-1.fcoe+ #3 > > [ 123.041735] Call Trace: > > [ 123.041750] [<ffffffff8105654f>] warn_slowpath_common+0x7f/0xc0 > > [ 123.041753] [<ffffffff81056646>] warn_slowpath_fmt+0x46/0x50 > > [ 123.041764] [<ffffffff8111cc4b>] ? mempool_create_node+0x6b/0x140 > > [ 123.041769] [<ffffffff8113a891>] pcpu_alloc+0x9e1/0x9f0 > > [ 123.041771] [<ffffffff8111ca65>] ? mempool_alloc_slab+0x15/0x20 > > [ 123.041773] [<ffffffff8111ca30>] ? mempool_kmalloc+0x20/0x20 > > [ 123.041775] [<ffffffff8111ca65>] ? mempool_alloc_slab+0x15/0x20 > > [ 123.041777] [<ffffffff8111cccb>] ? mempool_create_node+0xeb/0x140 > > [ 123.041780] [<ffffffff8113a8b0>] __alloc_percpu+0x10/0x20 > > [ 123.041793] [<ffffffffa00f3117>] fc_exch_mgr_alloc+0x107/0x210 [libfc] > > [ 123.041799] [<ffffffffa0132138>] fcoe_if_create+0x538/0x750 [fcoe] > > [ 123.041802] [<ffffffffa01327b3>] fcoe_create+0x2c3/0x620 [fcoe] > > [ 123.041810] [<ffffffffa0124418>] fcoe_transport_create+0x178/0x2a0 > > [libfcoe] > > [ 123.041819] [<ffffffff81075a69>] param_attr_store+0x49/0x80 > > [ 123.041822] [<ffffffff8107567d>] module_attr_store+0x1d/0x40 > > [ 123.041839] [<ffffffff811e55ef>] sysfs_write_file+0xef/0x170 > > [ 123.041848] [<ffffffff81178a13>] vfs_write+0xb3/0x180 > > [ 123.041851] [<ffffffff81178d3a>] sys_write+0x4a/0x90 > > [ 123.041866] [<ffffffff815ed5a9>] system_call_fastpath+0x16/0x1b > > [ 123.041868] ---[ end trace b7fcc55c13016a43 ]--- > > [ 123.041873] fcoe_em_config: failed to allocate em on interface eth1 > > [ 123.041880] fcoe: Failed to create interface (eth1) > > > > _______________________________________________ devel mailing list [email protected] https://lists.open-fcoe.org/mailman/listinfo/devel
