RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic

From
Dexuan Cui <decui@microsoft.com>
Date
2014-07-09 01:47:07
Also in
lkml
Reply to
gregkh@linuxfoundation.org, 2014-07-08
-----Original Message-----
quoted
quoted
From: Dan Carpenter [mailto:<redacted>]
Sent: Tuesday, July 8, 2014 17:27 PM
To: Dexuan Cui
Cc: gregkh@linuxfoundation.org; <redacted>;
driverdev-
quoted
quoted
devel@linuxdriverproject.org; plagnioj@jcrosoft.com;
tomi.valkeinen@ti.com; linux-fbdev@vger.kernel.org; olaf@aepfle.de;
apw@canonical.com; jasowang@redhat.com; Haiyang Zhang
Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen
by
quoted
quoted
force on VM panic

Don't use likely/unlikely unless you have benchmark numbers to show
that
quoted
quoted
it makes a speed up.

regards,
dan carpenter
Hi Dan,
Here the variable 'synchronous_fb' is only set to true when the system
panics.
quoted
So before the system panics, it's always 'unlikely'. :-)
Then take advantage of gcc's and your processor's prediction, which
knows that 0 is the "common" case and will choose to do the right thing
here.

Dan is right, never put those markings in your code unless you can
benchmark the difference.  Which means in reality, never put them in
your code.

gerg k-h
OK, let me send out a v3 patch, which will remove the unlikely.

Thanks,
-- Dexuan
Thread (6 messages) 6 messages, 3 authors, last reply 2014-07-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help