3 ms·
You can, but it requires special architecture for the application. The cpuset can be used to disable scheduler use of the core and then you can pin application
by lmilcin 7y ago
You can, but it requires special architecture for the application. The cpuset can be used to disable scheduler use of the core and then you can pin application threads to cores, single thread per core.
Only then it makes sense tu use spin locks.
- xakahnx 7y agoThis is still a disaster with hyperthreading where you can have two threads contending for a lock on the same physical core. Even if your thread won't be scheduled off the core I don't know if you might still have irqs stealing time during the critical section.
- touisteur 7y agoCan't you isolate cores from irqs with irq affinities? I'd be more worried by SMM stealing CPU time (ugh... talk about sad stories of 'real-time' Linux...).
- GhettoMaestro 7y agoObviously you've never heard of DPDK.
- kanox 7y agoReserving CPUs for your application definitely qualifies as "extreme measures". In general you should expect userspace code to be scheduled out at any time and use locking primitives that the kernel knows about.