On Tue, Nov 19, 2024 at 02:25:12PM -0800, mitchell.augustin via groups.io wrote:
> Hi,
> 
> Thanks for the suggestion. I'm not necessarily saying this patch
> itself has an issue, just that it is the point in the git history at
> which this slow boot time issue manifests for us. This may be because
> the patch does actually fix the other issue I described above related
> to BAR assignment not working correctly in versions before that patch,
> despite boot being faster back then. (in those earlier versions, the
> PCI devices for the GPUs were passed through, but the BAR assignment
> was erroneous, so we couldn't actually use them - the Nvidia GPU
> driver would just throw errors.)

Do you also see the slowdown without the GPU in a otherwise identical
guest configuration?

While debugging a similar issue I've found that kvm behaves differently
in case a PCI-assigned device is present, specifically kvm goes look
more closely at memory attributes in guest page tables and mtrr
registers and uses them for EPT configuration.  See commit ce4c76e46d52
("OvmfPkg/Sec: Setup MTRR early in the boot process.").

So this could be an issue in kvm.  It could also be ovmf doing something
wrong with page attributes and mtrr settings.

> After I initially posted here, we also discovered another kernel issue
> that was contributing to the boot times for this config exceeding 5
> minutes - so with that isolated, I can say that my config only takes
> about a 5 minutes for a full boot: 1-2 minutes for `virsh start`
> (which scales with guest memory allocation),

Looks quite high to me.  What amount of guest memory we are talking
about?

> I'm going to attempt to profile ovmf next to see what part of the code
> path is taking up the most time, but if you already have an idea of
> what that might be (and whether it is actually a bug or expected to
> take that long), that insight would be appreciated.

More details would be helpful indeed.  Is that a general overall
slowdown?  Is it some specific part which takes alot of time?  I'd
suggest to also trim down the logging, it's quite excessive in the build
(apparently every single memory allocation is logged), that slows down
the boot process too.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120804): https://edk2.groups.io/g/devel/message/120804
Mute This Topic: https://groups.io/mt/109651206/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to