• Herbert Xu's avatar
    tun: Only wake up writers · c722c625
    Herbert Xu authored
    When I added socket accounting to tun I inadvertently introduced
    spurious wake-up events that kills qemu performance.  The problem
    occurs when qemu polls on the tun fd for read, and then transmits
    packets.  For each packet transmitted, we will wake up qemu even
    if it only cares about read events.
    
    Now this affects all sockets, but it is only a new problem for
    tun.  So this patch tries to fix it for tun first and we can then
    look at the problem in general.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c722c625
tun.c 32.7 KB