lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Jul 2014 15:34:25 -0700
From:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
To:	Dexuan Cui <decui@...rosoft.com>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tomi.valkeinen@...com" <tomi.valkeinen@...com>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"apw@...onical.com" <apw@...onical.com>,
	"plagnioj@...osoft.com" <plagnioj@...osoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by
 force on VM panic

On Tue, Jul 08, 2014 at 10:17:48PM +0000, Dexuan Cui wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter@...cle.com]
> > Sent: Tuesday, July 8, 2014 17:27 PM
> > To: Dexuan Cui
> > Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org; driverdev-
> > devel@...uxdriverproject.org; plagnioj@...osoft.com;
> > tomi.valkeinen@...com; linux-fbdev@...r.kernel.org; olaf@...fle.de;
> > apw@...onical.com; jasowang@...hat.com; 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ