• Eric Dumazet's avatar
    rps: Various optimizations · eecfd7c4
    Eric Dumazet authored
    Introduce ____napi_schedule() helper for callers in irq disabled
    contexts. rps_trigger_softirq() becomes a leaf function.
    
    Use container_of() in process_backlog() instead of accessing per_cpu
    address.
    
    Use a custom inlined version of __napi_complete() in process_backlog()
    to avoid one locked instruction :
    
     only current cpu owns and manipulates this napi,
     and NAPI_STATE_SCHED is the only possible flag set on backlog.
     we can use a plain write instead of clear_bit(),
     and we dont need an smp_mb() memory barrier, since RPS is on,
     backlog is protected by a spinlock.
    Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    eecfd7c4
dev.c 143 KB