Ingo Molnar, maintainer of the x86 architecture, locking mechanism, and task scheduler in the Linux kernel, has submitted a set of patches for discussion to remove support for 486 processors (M486, M486SX, AMD ELAN) and early series 586 processors from the kernel. The kernel is proposed to retain support only for x86 processors that support the CX8 instruction (CMPXCHG8B) and the TSC (Time Stamp Counter) register, which were introduced in Pentium CPUs.
It is noted that maintaining 486 CPU support in the kernel requires keeping code that emulates CX8 operations (compare and exchange 8 bytes) and TSC (CPU cycle counter used in the task scheduler). Such code complicates the kernel, makes maintenance difficult, and at times becomes a source of issues, consuming developers' time for debugging. Ceasing support for the 486 will allow for the removal of 14,104 lines of code from the kernel, substantially simplifying some functions by eliminating layers that emulate CX8 and TSC, and allowing the removal of the math-emu library that emulates the FPU.
Un giorno prima della pubblicazione delle patch, la questione della validità della rimozione del supporto per i CPU 486 è stata sollevata da Linus Torvalds durante una discussione su un problema ricorrente nell'emulazione di CX8. Linus ritiene che sia giunto il momento di abbandonare il supporto per le CPU 486 e non vede ragioni per continuare a far spendere tempo agli sviluppatori nella risoluzione dei problemi che queste comportano. Il supporto per i processori 386 è stato rimosso dal kernel nel 2012. Secondo i partecipanti alla discussione, ora è il momento di eliminare il supporto per le CPU 486. Nel ottobre 2022, Linus aveva già pubblicato una proposta simile, ma essa non ha avuto seguito.
Nei sistemi 486 ancora in uso, i kernel Linux attuali sono praticamente inutilizzati. Varianti specializzate delle CPU 486 per sistemi embedded, come l'Intel Quark, supportano CX8 e TSC, e le loro modifiche non saranno interessate. I vecchi CPU 486 originali sono generalmente ancora utilizzati con distribuzioni obsolete che forniscono versioni precedenti del kernel Linux. Le distribuzioni moderne di Linux hanno da tempo interrotto il supporto per i sistemi x86 a 32 bit o sono passate all'utilizzo dell'opzione di build X86_PAE, che richiede il supporto per CX8.
Fonte: opennet.ru
