From: "Huang\, Ying" <ying.huang@linux.intel.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
"Huang, Ying" <ying.huang@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Borislav Petkov <bp@suse.de>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] GHES: Fix cached error-status
Date: Mon, 26 Oct 2015 11:20:35 +0800 [thread overview]
Message-ID: <87611uz56k.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F32B5DE60@ORSMSX114.amr.corp.intel.com> (Tony Luck's message of "Sat, 24 Oct 2015 07:05:15 +0800")
Hi, Tony,
"Luck, Tony" <tony.luck@intel.com> writes:
>> ping?
>
> I'm not actually sure that the code is wrong. As you say it is a pretty strange loop.
>
> We seem to want to look at a bunch of conditions, and use "continue" to ignore
> bits until we find one that we like the look of. Perhaps as soon as we do, we want
> to believe it to get our return value? Perhaps the code knows that we won't find
> another section that matches all the tests, so it isn't worth going around the loop
> again.
>
> Ying: You wrote this code 4 years ago. Any recollections of why it looks like it does?
Sorry for late. I read the code again, and found the although the
original code is a little tricky, it actually works.
In ghes_estatus_caches[], for caches with same contents, the cache with
biggest (newest) cache->time_in should be the first. So if we found one
cache with too small (old) cache->time_in, we can say there are no cache
with same contents and bigger (newer) cache->time_in, so that we can
make decision (break) earlier.
Best Regards,
Huang, Ying
next prev parent reply other threads:[~2015-10-26 3:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 17:55 [PATCH] GHES: Fix cached error-status Davidlohr Bueso
2015-10-23 22:50 ` Davidlohr Bueso
2015-10-23 23:05 ` Luck, Tony
2015-10-26 3:20 ` Huang, Ying [this message]
2015-10-26 4:30 ` Borislav Petkov
2015-10-26 5:43 ` Huang, Ying
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=87611uz56k.fsf@yhuang-dev.intel.com \
--to=ying.huang@linux.intel.com \
--cc=bp@suse.de \
--cc=dave@stgolabs.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tony.luck@intel.com \
--cc=ying.huang@intel.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;
as well as URLs for NNTP newsgroup(s).