mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
simplified code to easily restore smp affinity
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@126 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
4432a7ff6b
commit
9f81e3d2ec
1 changed files with 1 additions and 8 deletions
|
@ -85,8 +85,6 @@ static void start()
|
|||
|
||||
static void stop()
|
||||
{
|
||||
int affinity;
|
||||
|
||||
/* Join all threads and print statistics */
|
||||
for (struct path *p = paths; p; p = p->next) {
|
||||
path_stop(p);
|
||||
|
@ -104,14 +102,9 @@ static void stop()
|
|||
node_disconnect(n);
|
||||
}
|
||||
|
||||
/* Determine default affinity */
|
||||
FILE * f = fopen("/proc/irq/default_smp_affinity", "r");
|
||||
fscanf(f, "%x", &affinity);
|
||||
fclose(f);
|
||||
|
||||
/* Reset interface queues and affinity */
|
||||
for (struct interface *i = interfaces; i; i = i->next) {
|
||||
if_setaffinity(i, affinity);
|
||||
if_setaffinity(i, -1);
|
||||
tc_reset(i);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue