This opens the question of what do we mean for core ID (as in core_id()
result) within the kernel.
We do use this in many places:

send_kernel_message(core_id(), ...);

And the send_kernel_message() API uses that core ID directly as LAPIC
ID in send IPI.

So there seem to be an implicit 1:1 between the logical core IDs, and
the LAPIC IDs AFAICS.



On Wed, Dec 2, 2015 at 3:04 PM, Davide Libenzi <[email protected]> wrote:

> Found it: get_os_coreid
>
>
> On Wed, Dec 2, 2015 at 2:19 PM, Davide Libenzi <[email protected]>
> wrote:
>
>> Is there a mapping function?
>>
>>
>> On Wed, Dec 2, 2015 at 2:16 PM, Barret Rhoden <[email protected]>
>> wrote:
>>
>>> On 2015-12-02 at 14:04 "'Davide Libenzi' via Akaros"
>>> <[email protected]> wrote:
>>> > Do they agree?
>>> >
>>>
>>> No.  The LAPIC ids are the "hardware" core ids (hw_core_id()).
>>> Everything higher up in the OS is an "os" core id, which you get from
>>> core_id().
>>>
>>> On small machines (single socket) they usually line up.  But as you get
>>> onto bigger machines, the hw_core_id() encodes the topology
>>> information and is not continuous.  The os core_id space is densely
>>> packed.
>>>
>>> Barret
>>>
>>> --
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to