On Wed, Dec 10, 2008 at 10:42:28AM -0800, Vasu Dev wrote: > > It had load balancing issue but now it is fixed, related latest > submitted code with its updated comment is:- > > /* > * The incoming frame exchange id(oxid) is ANDed with num of online > * cpu bits to get cpu_idx and then this cpu_idx is used for > selecting > * a per cpu kernel thread from fcoe_percpu. In case the cpu is > * offline or no kernel thread for derived cpu_idx then cpu_idx is > * initialize to first online cpu index. > */ > cpu_idx = oxid & (num_online_cpus() - 1); First note that num_online_cpus() is not guaranteed to be a power of two, - 1 is not guaranteed to give a suitable mask. So you might actually lose random bits. Also your load balancing scheme is unusual to say at least. e.g. when you're just talking to a single frame exchange you would always transfer data between CPUs instead of keeping it all on the CPU that processes the interrupt. Normally the rule of thumb is to use local data as much as possible. Or when you distribute like this at least stay in the same socket. But probably the scheme is too clever anyways. -Andi -- ak@xxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html