On Mon, Jan 23, 2012 at 11:37 AM, Roman Yeryomin <[email protected]> wrote: > I will test more thoroughly but I noticed about 0.7 MB/s speed drop > comparing with those spinlocks commented out.
Hmm, ok, might as well just be a wifi interference/noise issue? Maybe just try on eth only with iperf or something similar? With a dedicated peer and a simple crossover cable maybe. >>>> Are you sure it's needed? >> >> No, but the spinlock_irqsave locked between the housekeeping path >> and the tx path. The new locking just does the same without the need to >> disabled IRQs. > > Yes, but houskeeping tasklet is also called from other places too. Correct. The tx path used spin_lock_irqsave on page_lock, which is _only_ used in the xmit function => Hence, it basically downgrades the spin_lock_irqsave to a local_irq_disable which disables hard IRQs. And prevents the "normal" housekeeping in IRQ context to run. The ramips_eth_timeout is unlikely to be called. And furthermore, we're on a UP machine. There's only one tasklet run at once. Hence, no locking is required (sort of). That's also why the spin_lock should be optimized out in that case. > And as I understand interrupts are disabled before calling tasklet anyway? No. It wouldn't make sense to disable hard IRQs while a tasklet is run. If this would be the case you could just put everything in the IRQ handler. > I can't say much about what is right and what is wrong but reading > about tasklets > (http://home.comcast.net/~heidi.young1/projects/cs517b/linuxkernel_ch6/tasklets.htm) > I noticed that before scheduling a tasklet irq state have to be saved > (I suppose that is what irqsave is for)? > Sorry for the dumb questions if they are. tasklet_schedule will disable IRQs while adding the tasklet to the list of scheduled tasklets as otherwise another IRQ could interfere while manipulating the list of scheduled tasklets. While the tasklets are executed hard IRQs are most of the time enabled. Helmut _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
