[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enable SMP support
From: |
Richard Braun |
Subject: |
Re: Enable SMP support |
Date: |
Sat, 16 Jun 2018 18:08:41 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Jun 16, 2018 at 01:17:57PM +0200, Almudena Garcia wrote:
> Finally, we got to write a test function to get the apic_id, and It feels
> to run correctly.
> Now, we're trying to implement another function, to transform the apic_id
> in the kernel cpuid.
>
> I attach the current test function to get apic_id with its test file
One other thing.
No sane operating system uses the cpuid instruction each time they need
to identify the current processor, because of its cost (it's a fully
serializing instruction). Instead, they make the fs or gs segment
register refer to a per-processor area in memory, where the ID of the
current processor can be found, among other things. See the cpu_id()
function at [1] for a reasonably simple (but not naive) implementation.
--
Richard Braun
[1]
https://git.sceen.net/rbraun/x15.git/tree/arch/x86/machine/cpu.h?id=7615ab33c6d9e0b858aa3f183095a83f7a1d0620#n471
- Re: Enable SMP support, (continued)
- Re: Enable SMP support, Samuel Thibault, 2018/06/17
- Re: Enable SMP support, Almudena Garcia, 2018/06/17
- Re: Enable SMP support, Almudena Garcia, 2018/06/18
- Re: Enable SMP support, Samuel Thibault, 2018/06/18
- Re: Enable SMP support, Almudena Garcia, 2018/06/19
- Re: Enable SMP support, Joshua Branson, 2018/06/19
- Re: Enable SMP support, Almudena Garcia, 2018/06/27
- Re: Enable SMP support, Samuel Thibault, 2018/06/27
- Re: Enable SMP support, Almudena Garcia, 2018/06/27
- Re: Enable SMP support, Almudena Garcia, 2018/06/28
- Re: Enable SMP support,
Richard Braun <=