WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel][PATCH] VNIF: Using smart polling instead of event notifi

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: RE: [Xen-devel][PATCH] VNIF: Using smart polling instead of event notification.
From: "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>
Date: Thu, 1 Oct 2009 22:02:19 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 01 Oct 2009 07:02:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHKQp/K2zKemZxMMk+ZfU2fi27TTg==
Thread-topic: [Xen-devel][PATCH] VNIF: Using smart polling instead of event notification.
    We found that the event notification frequency is still high in some 
network cases. NAPI polls only for a little
time slot and does not efficient enough in our backend/frontend case. Actually 
our patch repeated calling NAPI
interface to do more polling, and netback will NOT notify netfront during this 
period. Once netfront polling out
all the data, and finds that there is no more data arrive/send during the next 
100ms, the timer will stop working 
to end the polling. 
    This filed 'smart_poll_active' is shared by netfront and netback, to 
indicate whether netfront is polling data. 
So this filed is necessary for netback to notify netfront if this flag is not 
set. 
This field is different from the flag in xenstore, which indicates whether 
other-end has this new feature. If other-end doesn't support the new feature, 
everything goes in the original way. 

Thanks!
Dongxiao

________________________________________
From: Ian Campbell [Ian.Campbell@xxxxxxxxxx]
Sent: Thursday, October 01, 2009 3:03 AM
To: Xu, Dongxiao
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Keir Fraser
Subject: Re: [Xen-devel][PATCH] VNIF: Using smart polling instead of event      
notification.

You are adding a netfront specific field to the generic ring structure?
That seems rather ugly.

Is this even necessary as a piece of shared state? Once netback and
netfront have agreed, via xenstore, to use the feature netback seems to
set the flag every time it would have previously notified netfront.

Ian.

On Thu, 2009-10-01 at 01:22 +0100, Xu, Dongxiao wrote:
> Resend and put the patch in attachment.
>
> Patch the Xen version of ring.h
>
> Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
>
> diff -r 8fc927798476 xen/include/public/io/ring.h
> --- a/xen/include/public/io/ring.h      Tue Sep 01 11:36:51 2009 +0100
> +++ b/xen/include/public/io/ring.h      Thu Oct 01 02:11:45 2009 +0800
> @@ -97,7 +97,8 @@ struct __name##_sring {
>  struct __name##_sring {                                                 \
>      RING_IDX req_prod, req_event;                                       \
>      RING_IDX rsp_prod, rsp_event;                                       \
> -    uint8_t  pad[48];                                                   \
> +    uint8_t  netfront_smartpoll_active;                                 \
> +    uint8_t  pad[47];                                                   \
>      union __name##_sring_entry ring[1]; /* variable-length */           \
>  };                                                                      \
>                                                                          \
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel