Thanks.

Yes, HOB memory can be tightly constrained, so we couldn't create HOB for every 
variable header. Why is this particular 'merge operation'? It is because only 
this variable may be inconsecutive, it can reduce the times of copy to stack 
from flash obviously, and one sizeof(VARIABLE_HEADER) of HOB memory consumed 
should be acceptable completely. With the gain, I think the pay is worth.
And I think it is not a case of premature optimization and we do not try to get 
into the habit of using it. VARIABLE region is a special region in FLASH, we 
use methods(you can see another method with gEfiVariableIndexTableGuid HOB has 
been present in original code) to accelerate the access speed because there may 
be many variable accesses by platform. 

Star
-----Original Message-----
From: Jordan Justen [mailto:[email protected]] 
Sent: Monday, July 01, 2013 2:42 AM
To: Andrew Fish
Cc: Zeng, Star; [email protected]
Subject: Re: [edk2] [PATCH 1/2] MdeModulePkg and SecurityPkg: PEI variable does 
not robustly handle crashes during Reclaim().

On Sat, Jun 29, 2013 at 3:58 PM, Andrew Fish <[email protected]> wrote:
> On Jun 29, 2013, at 8:05 AM, "Zeng, Star" <[email protected]> wrote:
>> About whether it is really worth it to allocate the HOB in this case, 
>> it is because we don't want to assume the potential call times of 
>> platform.
>
> I agree that slower FLASH/ROM speeds have a big impact on boot time. 
> More modern chipsets have improved the NOR FLASH speed, but it is hard 
> to get a general number on something like this.

Yes, it can be slow, but that doesn't mean we should create a HOB for any data 
accessed from flash. HOB memory can be tightly constrained, so I don't think we 
should get into the habit of using it unless we've shown that is really worth 
the trade off.

Star, are you sure this isn't a case of premature optimization?

By the way, we already accessing the flash directly for every other variable 
header. Why is this particular 'merge operation'
so important?

If we are accessing the each header several times, then maybe it would be 
faster to copy/merge the header for every variable, and then access the header 
from the copy on the stack.

This discussion is a prime example of how our project could benefit from using 
git. These two "big" patches really deserve to be broken up somewhat. There is 
quite a lot happening here, and it would be nice to review and discuss it at a 
finer granularity.


-Jordan

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to