qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] xenfb: use the correct condition to avoi


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH v2 1/3] xenfb: use the correct condition to avoid excessive looping
Date: Tue, 12 Apr 2016 10:12:28 -0700 (PDT)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

On Tue, 12 Apr 2016, Wei Liu wrote:
> In commit ac0487e1 ("xenfb.c: avoid expensive loops when prod <=
> out_cons"), ">=" was used. In fact, a full ring is a legit state.
> Correct the test to use ">".
> 
> Reported-by: "Hao, Xudong" <address@hidden>
> Signed-off-by: Wei Liu <address@hidden>
> Tested-by: "Hao, Xudong" <address@hidden>
> Acked-by: Anthony Perard <address@hidden>

Acked-by: Stefano Stabellini <address@hidden>

I'll add it to my queue


> Cc: Stefano Stabellini <address@hidden>
> Cc: Anthony Perard <address@hidden>
> 
> Backport candidate to our own tree.
> ---
>  hw/display/xenfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
> index 40b096a..9866dfd 100644
> --- a/hw/display/xenfb.c
> +++ b/hw/display/xenfb.c
> @@ -775,7 +775,7 @@ static void xenfb_handle_events(struct XenFB *xenfb)
>  
>      prod = page->out_prod;
>      out_cons = page->out_cons;
> -    if (prod - out_cons >= XENFB_OUT_RING_LEN) {
> +    if (prod - out_cons > XENFB_OUT_RING_LEN) {
>          return;
>      }
>      xen_rmb();               /* ensure we see ring contents up to prod */
> -- 
> 2.1.4
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]