> As Richard said, we just want to have different GDTs on the different > processors, so that we wan use the fs segment register to implement TLS > in the kernel and have per-cpu data cost essentially the same as global > data.
Yes, but how can I store the relation APIC ID - Kernel ID in the GDT? Is there any way to avoid using an array for that? > (I don't mean it has to be implemented so for commiting to mainline, > just saying how we can optimize after it) I'm still learning yet, so many concepts are difficult for me. My idea is to get a basic and functional SMP implementation, and then get help from more experienced developers to improve it. El jue., 30 jul. 2020 a las 23:21, Samuel Thibault (<samuel.thiba...@gnu.org>) escribió: > Samuel Thibault, le jeu. 30 juil. 2020 23:21:02 +0200, a ecrit: > > As Richard said, we just want to have different GDTs on the different > > processors, so that we wan use the fs segment register to implement TLS > > in the kernel and have per-cpu data cost essentially the same as global > > data. > > (I don't mean it has to be implemented so for commiting to mainline, > just saying how we can optimize after it) > > Samuel > >