From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"driverdev-devel@linuxdriverproject.org"
<driverdev-devel@linuxdriverproject.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tomi.valkeinen@ti.com" <tomi.valkeinen@ti.com>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"plagnioj@jcrosoft.com" <plagnioj@jcrosoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
Date: Tue, 8 Jul 2014 15:34:25 -0700 [thread overview]
Message-ID: <20140708223425.GB6310@kroah.com> (raw)
In-Reply-To: <EE124450C0AAF944A40DD71E61F878C987A663@SINEX14MBXC417.southpacific.corp.microsoft.com>
On Tue, Jul 08, 2014 at 10:17:48PM +0000, Dexuan Cui wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> > Sent: Tuesday, July 8, 2014 17:27 PM
> > To: Dexuan Cui
> > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; driverdev-
> > 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
> > 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
next prev parent reply other threads:[~2014-07-08 22:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 21:35 [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic Dexuan Cui
2014-07-08 9:06 ` Dexuan Cui
2014-07-08 9:27 ` Dan Carpenter
2014-07-08 22:17 ` Dexuan Cui
2014-07-08 22:34 ` gregkh [this message]
2014-07-09 1:46 ` Dexuan Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140708223425.GB6310@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=apw@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=decui@microsoft.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=jasowang@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox