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

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

 



On Tue, Jul 08, 2014 at 10:17:48PM +0000, Dexuan Cui wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> > Sent: Tuesday, July 8, 2014 17:27 PM
> > To: Dexuan Cui
> > Cc: gregkh@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; driverdev-
> > devel@xxxxxxxxxxxxxxxxxxxxxx; plagnioj@xxxxxxxxxxxx;
> > tomi.valkeinen@xxxxxx; linux-fbdev@xxxxxxxxxxxxxxx; olaf@xxxxxxxxx;
> > apw@xxxxxxxxxxxxx; jasowang@xxxxxxxxxx; Haiyang Zhang
> > Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by
> > force on VM panic
> > 
> > Don't use likely/unlikely unless you have benchmark numbers to show that
> > it makes a speed up.
> > 
> > regards,
> > dan carpenter
> 
> Hi Dan,
> Here the variable 'synchronous_fb' is only set to true when the system panics.
> 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.

thanks,

gerg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux