Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
x2apic benefits...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4107

PostPosted: Fri Oct 02, 2020 8:56 am    Post subject: x2apic benefits... Reply with quote

Here's a 4 Gb RAM+Skylake-2-cores.
Only qemu for arm64.
kernel IOMMU activated as security measure.
It has unhide x2apic kernel option.

Any benefit activating it?
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4107

PostPosted: Sat Oct 03, 2020 7:01 am    Post subject: Reply with quote

Intel specs
I'ven't read it enough times to make up my mind.:?
Thks 4 ur attention, inretest & support.
Back to top
View user's profile Send private message
ff11
l33t
l33t


Joined: 10 Mar 2014
Posts: 665

PostPosted: Sat Oct 03, 2020 10:15 am    Post subject: Reply with quote

When enabled, processor x2APIC support helps operating systems run more efficiently on high core count configurations and optimizes interrupt distribution in virtualized environments.
You have one "Skylake-2-cores", so maybe you want it disabled.
_________________
| Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4107

PostPosted: Sat Oct 03, 2020 10:38 am    Post subject: Reply with quote

Sure :wink:. There's also:
Code:
• More efficient MSR interface to access APIC registers.
— To enhance inter-processor and self directed interrupt delivery as well as the
  ability to virtualize the local APIC, the APIC register set can be accessed only
  through MSR based interfaces in the x2APIC mode. The Memory Mapped IO
  (MMIO) interface used by xAPIC is not supported in the x2APIC mode.
which I don't fully understand :oops::
Code:
- enhance inter-processor and self directed interrupt delivery (?faster)
- virtualize the local APIC (?safer)
- MMIO interface used by xAPIC is not supported (?critical)
Thks 5 ur attention, interest & support.
Back to top
View user's profile Send private message
ff11
l33t
l33t


Joined: 10 Mar 2014
Posts: 665

PostPosted: Sat Oct 03, 2020 10:57 am    Post subject: Reply with quote

CaptainBlood wrote:
Sure :wink:. There's also:
Code:
• More efficient MSR interface to access APIC registers.
— To enhance inter-processor and self directed interrupt delivery as well as the
  ability to virtualize the local APIC, the APIC register set can be accessed only
  through MSR based interfaces in the x2APIC mode. The Memory Mapped IO
  (MMIO) interface used by xAPIC is not supported in the x2APIC mode.
which I don't fully understand :oops::
Code:
- enhance inter-processor and self directed interrupt delivery (?faster)
- virtualize the local APIC (?safer)
- MMIO interface used by xAPIC is not supported (?critical)
Thks 5 ur attention, interest & support.

Yep! It can be useful if you want to have many visualized environments running at the same time, but I'm guessing you don't wanna do this on a 2-core processor.
The Advanced Programmable Interrupt Controller (APIC) is intended to solve interrupt routing efficiency issues in multiprocessor computer systems. I don't see this being a issue on a 2-core system. Simpler routing can be faster, as it doesn't carry the extra controller's code that can control many ones.
But, again, if one day you want to run more than 10 virtual machines at the same time on this processor, go ahead, enable and test, as it can be useful. It's hard to be precise on the exact number of cores that this feature pays off for the extra code.
_________________
| Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6368
Location: Dallas area

PostPosted: Sat Oct 03, 2020 11:56 am    Post subject: Reply with quote

Quote:
The xAPIC was introduced with the Pentium 4, while the x2APIC is the most recent generation of the Intel's programmable interrupt controller, introduced with the Nehalem microarchitecture in November 2008.[17] The major improvements of the x2APIC address the number of supported CPUs and performance of the interface.

The x2APIC now uses 32 bits to address CPUs, allowing to address up to 232 − 1 CPUs using the physical destination mode. The logical destination mode now works differently and introduces clusters; using this mode, one can address up to 220 − 16 processors. The x2APIC architecture also provides backward compatibility modes to the original Intel APIC Architecture (introduced with the Pentium/P6) and with the xAPIC architecture (introduced with the Pentium 4).

The improved interface reduces the number of needed APIC register access for sending Inter-processor interrupts (IPIs). Because of this advantage, KVM can and does emulate the x2APIC for older processors that do not physically support it, and this support is exposed from QEMU going back to Conroe and even for AMD Opteron G-series processors (neither of which natively support x2APIC).[18][19]


https://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller#X2APIC
_________________
UM780 xtx, 6.14 zen kernel, gcc 15, openrc, wayland

Got to love snowflakes, how does the world survive without them.
Back to top
View user's profile Send private message
ff11
l33t
l33t


Joined: 10 Mar 2014
Posts: 665

PostPosted: Sat Oct 03, 2020 1:33 pm    Post subject: Reply with quote

ok! If the objective is give one full understand of the subject, then I recommend this guide (It won't offer the best "benchmarked" option, but it will have a reasonably complete explanation, better than wiki pages):

External Interrupts in the x86 system. Part 1. Interrupt controller evolution
External Interrupts in the x86 system. Part 2. Linux kernel boot options
External Interrupts in the x86 system. Part 3. Interrupt routing setup in a chipset, with the example of coreboot
_________________
| Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6368
Location: Dallas area

PostPosted: Sat Oct 03, 2020 1:58 pm    Post subject: Reply with quote

The important part is this The major improvements of the x2APIC address the number of supported CPUs and performance of the interface.

which kind of addresses the original query, Any benefit activating it?
_________________
UM780 xtx, 6.14 zen kernel, gcc 15, openrc, wayland

Got to love snowflakes, how does the world survive without them.
Back to top
View user's profile Send private message
ff11
l33t
l33t


Joined: 10 Mar 2014
Posts: 665

PostPosted: Sat Oct 03, 2020 2:14 pm    Post subject: Reply with quote

Anon-E-moose wrote:
The important part is this The major improvements of the x2APIC address the number of supported CPUs and performance of the interface.
...

that, by the way, for the number is more than 255 cores/threads, and for the performance should be more than 10 cores/threads. Even the CONFIG_X86_X2APIC help have "This allows 32-bit apic IDs (so it can support very large systems), and accesses the local apic via MSRs not via mmio.". And that second point, of using MSRs, shouldn't affect performance with less than 10 core/threads so much (to be fair, we would need a reliable benchmark to confirm it).
_________________
| Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum