From: "Jan Beulich" Subject: Re: [Patch] fix xenfb_update_screen bogus rect Date: Wed, 28 Jan 2009 09:06:56 +0000 Message-ID: <49802E40.76E4.0078.0@novell.com> References: <497E784B.7060003@jp.fujitsu.com> <497ED10A.76E4.0078.0@novell.com> <498009CC.1000101@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <498009CC.1000101@jp.fujitsu.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Akio Takebe Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Generally this looks okay (assuming it works), but couldn't the update_want= ed field then go away altogether? Jan >>> Akio Takebe 28.01.09 08:31 >>> Hi, Jan Thank you for your review. I remade it simpler. But Just moving check-and-clear dirty flag to xenfb_update_screen(), a guest with vcpu=3D1 could not boot. It is caused by info->update_wanted =3D 0. So I moved kthread_run() into XenbusStateConnected handling. How about it? Signed-off-by: Akio Takebe Best Regards, Akio Takebe Jan Beulich wrote: > This looks bogus to me. check_is_dirty() definitely isn't needed - if at = all, a > memory read barrier may need to be added, but since kthread_should_stop()= > is a function call even that ought to be unnecessary. >=20 > I also think the other change is more involved than it needs to be - = it'd be > much simpler to let xenfb_update_screen() check-and-clear the dirty flag > along with reading the other fields, and bail if the flag was clear. >=20 > Jan >=20 >>>> Akio Takebe 27.01.09 03:58 >>> > Hi, >=20 > When I tested pvfb, I got the following warnings. > It seems to be caused by checking/setting info->dirty without dirty_lock.= > We need to check/set info->dirty safely. >=20 > xenfb_update_screen bogus rect 2147483647 0 2147483647 0 > BUG: warning at /root/linux-2.6.18-xen.hg/drivers/xen/fbfront/xenfb.c:24= 0/xenfb_update_screen() >=20 > Call Trace: > [] xenfb_thread+0x19b/0x2be > [] try_to_wake_up+0x33b/0x34c > [] __wake_up_common+0x3e/0x68 > [] autoremove_wake_function+0x0/0x2e > [] keventd_create_kthread+0x0/0x61 > [] xenfb_thread+0x0/0x2be > [] keventd_create_kthread+0x0/0x61 > [] kthread+0xd4/0x109 > [] child_rip+0xa/0x12 > [] keventd_create_kthread+0x0/0x61 > [] xen_send_IPI_mask+0x0/0xf5 > [] kthread+0x0/0x109 > [] child_rip+0x0/0x12 >=20 >=20 > FYI, when I tested it, I used the following shell scripts on PV guest. > The above warnings occurred in /var/log/messages. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > #!/bin/bash >=20 > while true > do > date > done > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > The attached patch fixed this warnings. > How about it? >=20 > Signed-off-by: Akio Takebe >=20 > Best Regards, >=20 > Akio Takebe >=20 >=20