public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Dong, Eric" <eric.dong@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>
Subject: Re: [Patch v3 2/3] UefiCpuPkg/MpInitLib: Remove StartCount and volatile definition.
Date: Wed, 25 Jul 2018 17:18:11 +0200	[thread overview]
Message-ID: <51dc2a09-17cb-2942-d578-74f25d18de65@redhat.com> (raw)
In-Reply-To: <ED077930C258884BBCB450DB737E66224AC5A5FD@shsmsx102.ccr.corp.intel.com>

On 07/25/18 14:09, Dong, Eric wrote:
> Hi Laszlo,
> 
> 
>> -----Original Message-----
>> From: Laszlo Ersek [mailto:lersek@redhat.com]
>> Sent: Wednesday, July 25, 2018 7:47 PM
>> To: Dong, Eric <eric.dong@intel.com>; edk2-devel@lists.01.org
>> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
>> Subject: Re: [edk2] [Patch v3 2/3] UefiCpuPkg/MpInitLib: Remove StartCount
>> and volatile definition.
>>
>> Hi Eric,
>>
>> On 07/25/18 09:50, Eric Dong wrote:
>>> The StartCount is duplicated with RunningCount, replace it with
>>> RunningCount. Also the volatile for RunningCount is not needed.
>>
>> after staring at this patch for a long time, I think it is correct.
>> However, I suggest that we improve the commit message, because this patch
>> actually does three things:
>>
>> (1) It removes "volatile" from RunningCount.
>>
>> [This is OK, because only the BSP modifies it.]
>>
>> (2) [This is the tricky part.]
>>
>> When we detect a timeout in CheckAllAPs(), and collect the list of failed CPUs,
>> the size of the list is derived from the following difference, before the patch:
>>
>>   StartCount - FinishedCount
>>
>> where "StartCount" is set by the BSP at startup, and FinishedCount is
>> incremented by the APs themselves.
>>
> 
> I think FinishedCount used here is a typo. What the logic from the code context here is want to get the failed Aps and return them. So it should use RunningCount here, right? Also the FinishedCount may be bigger than StartCount if many Aps has been disabled. Right? 

I agree FinishedCount looks questionable / out of place in the original
code.

Thanks
Laszlo


  reply	other threads:[~2018-07-25 15:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  7:50 [Patch V3 0/3] StartAllAPs should not use disabled APs Eric Dong
2018-07-25  7:50 ` [Patch v3 1/3] UefiCpuPkg/MpInitLib: Remove redundant CpuStateFinished State Eric Dong
2018-07-25 10:54   ` Laszlo Ersek
2018-07-25 11:15     ` Dong, Eric
2018-07-26  5:18       ` Ni, Ruiyu
2018-07-25  7:50 ` [Patch v3 2/3] UefiCpuPkg/MpInitLib: Remove StartCount and volatile definition Eric Dong
2018-07-25 11:47   ` Laszlo Ersek
2018-07-25 12:09     ` Dong, Eric
2018-07-25 15:18       ` Laszlo Ersek [this message]
2018-07-26  5:22   ` Ni, Ruiyu
2018-07-25  7:50 ` [Patch v3 3/3] UefiCpuPkg/MpInitLib: Not use disabled AP when call StartAllAPs Eric Dong
2018-07-25 12:11   ` Laszlo Ersek
2018-07-25 12:44     ` Dong, Eric
2018-07-26  8:36   ` Ni, Ruiyu
2018-07-26  8:36     ` Ni, Ruiyu
2018-07-25 12:12 ` [Patch V3 0/3] StartAllAPs should not use disabled APs Laszlo Ersek
2018-07-25 15:18   ` Laszlo Ersek

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-list 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=51dc2a09-17cb-2942-d578-74f25d18de65@redhat.com \
    --to=devel@edk2.groups.io \
    /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