ia64/xen-unstable

changeset 2488:06ca92591145

bitkeeper revision 1.1159.1.157 (41498180eHcx-bWB5PNWSkz9fUhPzA)

Put the scheduling check back into the network backend as it may
be useful to frontend drivers in some circumstances.
author kaf24@freefall.cl.cam.ac.uk
date Thu Sep 16 12:05:20 2004 +0000 (2004-09-16)
parents 70305dfe5f6e
children d8a023aa1466
files linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c	Thu Sep 16 11:45:10 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c	Thu Sep 16 12:05:20 2004 +0000
     1.3 @@ -411,16 +411,16 @@ static void net_tx_action(unsigned long 
     1.4          
     1.5          pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx;
     1.6  
     1.7 -#if 0        
     1.8          /*
     1.9           * Scheduling checks must happen after the above response is posted.
    1.10 -         * This avoids a possible race with a guest OS on another CPU.
    1.11 +         * This avoids a possible race with a guest OS on another CPU if that
    1.12 +         * guest is testing against 'resp_prod' when deciding whether to notify
    1.13 +         * us when it queues additional packets.
    1.14           */
    1.15          mb();
    1.16          if ( (netif->tx_req_cons != netif->tx->req_prod) &&
    1.17               ((netif->tx_req_cons-netif->tx_resp_prod) != NETIF_TX_RING_SIZE) )
    1.18              add_to_net_schedule_list_tail(netif);
    1.19 -#endif
    1.20          
    1.21          netif_put(netif);
    1.22