Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #724

Pinning ethernet driver to a single core on dual core

Newsgroups comp.os.linux.development.system
Date 2014-10-25 19:19 -0700
Message-ID <2576a08d-5421-46be-8b06-77fa2061ad5a@googlegroups.com> (permalink)
Subject Pinning ethernet driver to a single core on dual core
From rshlinux@gmail.com

Show all headers | View raw


Hello,

I am looking into an ethernet driver source using workqueues running on linux version 3.4 on a dual core ARM platform 

The driver uses workqueues and my goal is to get the driver to run entirely on CPU1 instead of CPU0.

I tried a few things as part of my experiments:

When I do this 'cat /proc/interrupts | grep bcm'

I see these:

              CPU0           CPU1           

 251:      100371409          0          GIC  bcm
 252:      23875905           0          GIC  bcm

cat /proc/irq/251/smp_affinity
3

cat /proc/irq/251/smp_affinity_list
0-1

I changed the smp_affinity_list to 1 from 0-1

echo 1 > /proc/irq/251/smp_affinity_list
echo 1 > /proc/irq/252/smp_affinity_list

cat /proc/irq/251/smp_affinity_list
1

After this, I ran the below command

cat /proc/interrupts | grep bcm

              CPU0              CPU1           

 251:       100371409          37472         GIC  bcm
 252:       23875905           2837          GIC  bcm

The interrupts from that point went only to CPU1. 

At this point, I have a few questions:

1) Is the smp_affinity_list is the only change required to achieve my goal? 

2) Do I need to change the workqueue scheduling part to be forced to CPU1?

3) Are there any tools (or) kernel features available, that can be used to verify that the driver is using only CPU1 & NOT CPU 0 ??

Any help / pointers are highly appreciated.

Thanks
/R


Back to comp.os.linux.development.system | Previous | Next | Find similar


Thread

Pinning ethernet driver to a single core on dual core rshlinux@gmail.com - 2014-10-25 19:19 -0700

csiph-web