topology code

4 views
Skip to first unread message

ron minnich

unread,
Oct 5, 2015, 12:24:15 PM10/5/15
to aka...@googlegroups.com
if you have 2 cores, and the number of sockets is 0, and the num_numa is 0, well, things go badly on the divide :-)

ron

Kevin Klues

unread,
Oct 5, 2015, 12:26:15 PM10/5/15
to aka...@googlegroups.com
If the number of numa is0, then something is messed up in the acpi tables.
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akaros+un...@googlegroups.com.
> To post to this group, send email to aka...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
~Kevin

ron minnich

unread,
Oct 5, 2015, 12:30:24 PM10/5/15
to aka...@googlegroups.com
Yes, and ACPI tables are allowed to be messed up. In fact I'd go further and argue that we should not depend on them because
they are so frequently broken.

But chromebook ACPI tables are good, so this suggests a bug in expectations :-)

I'm going to change the code to set numa to > 0 if it's found to be <= 0. 

ron

Kevin Klues

unread,
Oct 5, 2015, 12:39:15 PM10/5/15
to aka...@googlegroups.com
Looking at the code, I'm trying to figure out why (if your acpi tables
are good), that it wouldn't return 1.

https://github.com/brho/akaros/blob/master/kern/arch/x86/topology.c#L108

It's a little weird to set num_numa initially to -1 and then always ++
it at the end, but it looks like we do that so that we can account for
a numa domain of 0 when counting them in the loop. So long as the
acpi tables have at least 1 numa domain, then num_numa should be 1
(otherwise it is 0).

Kevin

ron minnich

unread,
Oct 5, 2015, 12:57:40 PM10/5/15
to aka...@googlegroups.com
it's basically legal afaik to do what the coreboot acpi is doing, but acpi is such a train wreck -- who knows?

I think I have a fix, will send for review in a minute.

ron

ron minnich

unread,
Oct 5, 2015, 1:14:57 PM10/5/15
to aka...@googlegroups.com
OK, please take a look at origin/fixnuma. This works and boots for me.

I split set_num_numa into get_num_numa and set_num_numa; set calls get.

That way, get can be called multiple times if needed (it's now called twice) without changing the topo struct.

It's cheap to walk the acpi tables so I don't think that's a concern. But if you want to fix this a different way, that's 
ok, but I'll need to test any fixes on the chromebook.

btw, the cheapo haswell chromebook I have runs the linux guest VM just fine. It has all the features. 
So for 2x the cost of vmware, and 1/10 the hassle, I get real hardware that works better. It does weigh a pound
or so, and vmware weighs much less (quick, what's the mass of a 1 in a flash drive?) but it's way more convenient.

I'm going to check out newer chromebooks to see if the HT stuff will fool akaros enough to think it has 4 cores.

ron

Kevin Klues

unread,
Oct 15, 2015, 9:26:17 PM10/15/15
to Akaros
Reply all
Reply to author
Forward
0 new messages