Re: [Xen-devel] [RFC PATCH 3/6] netback: switch to NAPI + kthread model |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On 16/01/12 11:09, Ian Campbell wrote:
> I think you'd want to keep moving the event pointer to
> handle wrap around, i.e. by keeping it always either far enough away or
> right behind. (I think "req_cons - 1" is probably the correct option
> BTW).
When using RING_FINAL_CHECK_FOR_REQUESTS() as-is you will get an
additional spurious event every 4 billion events.
Something like this would fix it.
#define RING_FINAL_CHECK_FOR_REQUESTS(_r, _work_to_do) do {
(_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);
if (_work_to_do) {
/* ensure req_event is always in the past to avoid spurious
interrupt on wrap-around. */
(_r)->sring->req_event = (_r)->req_cons;
break;
}
(_r)->sring->req_event = (_r)->req_cons + 1;
mb();
(_work_to_do) = RING_HAS_UNCONSUMED_REQUESTS(_r);
} while (0)
And similarly for RING_FINAL_CHECK_FOR_RESPONSES().
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion]
[Ethernet Bridging]
[Linux Wireless Networking]
[Linux Bluetooth Networking]
[Linux Networking Users]
[VLAN]
[Git]
[IETF Annouce]
[Linux Assembly]
[Security]
[Bugtraq]
[Photo]
[Singles Social Networking]
[Yosemite Information]
[MIPS Linux]
[ARM Linux Kernel]
[ARM Linux]
[Linux Virtualization]
[Linux Security]
[Linux IDE]
[Linux RAID]
[Linux SCSI]
[Free Dating]