Souvik
Souvik

Reputation: 161

Linux device driver for SMP system

I have developed a Linux block device driver for CD device. The driver is working well but now there is a requirement that it should run on a SMP system. When I did a test run on the SMP system, I found the performance of the driver to degrade. The Bit rate for DATA CD has gone down tremendously as compared to single core system. So I understand that my driver needs to be modified to make it SMP safe.

In my driver , I have used : 1. Kernel threads 2. Mutex 3. Semaphore 4. Completions

My SMP system is : ARM Cortex-A9 Dual Core 600 MHz

Can some one please tell me what all factors that I should keep in mind while doing this porting?

Upvotes: 1

Views: 973

Answers (1)

Sajjad Ahmad
Sajjad Ahmad

Reputation: 429

Normally for SMP systems the shared resources (I/O resources) and global variables must be handled in such a way that simultaneous execution of a task must not overwrite, corrupt the data for this you can use spin_locks, semaphores etc to ensure that only one core will perform operation on that block/task at a time. This is logical implementation you've to identify the potential risky areas in device driver like ISR, read and write operations and have to identify the multiple entry points of your device driver and central task (in driver) toward which they are/will going/go.

Upvotes: 1

Related Questions