[Top][All Lists]

[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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]