[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/arm: add warning if memory modules overlap



Hi,

Sorry for the late answer.

On 11/10/2019 20:07, Brian Woods wrote:
On Fri, Oct 11, 2019 at 07:17:29PM +0100, Julien Grall wrote:
This code is also only called at boot where there are bigger time consuming
part (such as domheap initialization). So I would be surprised if you see
any improvement (other than a couple of cycles) in boot time here.

Therefore, I would favor a readable solution over a micro-optimized solution
here.

Which is why I wanted to put it where it was in the patch.  Where the
user would see the warning after the information about the memory
modules were printed (and fair early).

I had a think about it, dumping the modules informations before is useful if you know that you have one module max per kind. So you avoid to print the modules address/size in the warning.

However, it is possible to have multiple kernel module (as long as they don't have the same start address), you could end up with the following message:

"WARNING: modules Kernel and Kernel overlap"

To make the message more meaningful, we would need to print the modules address/size. Therefore, I don't view that it is important to check overlapping in early_print_info(). In this case I would favor any code that don't add a double for loop.

While thinking about this case, it made me realize that we only check the start address to consider a match. This means if the size is different, then it will be ignored. I think we ought to throw at least warning for this case as well.

Would you mind to have a look?


Either way, take your pick of location and if it's only debug or not and
I can write it up and test it.

I would still prefer in add_boot_module(). See why above.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.