Ignore:
Timestamp:
2016-05-24T21:00:37Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a7ba5e
Parents:
f570cdf
Message:

Do not create a new fibril for each IRQ notification

In the absence of fibril serialization, manager fibrils can
theoretically block in async IPC or on fibril synchronization
primitives. Consequently, it is safe to execute the IRQ handler directly
from the manager fibril. The manager fibril can block while processing
the notification, but most of the times it will not block and the
handler will execute atomically.

This changeset modifies the current behaviour so that we no longer spawn
a new notification fibril for each IRQ, but rather execute the handler
directly from the manager fibril and test if the execution blocked. If
it blocked, the manager fibril had assumed the role of a notification
fibril and we destroy it afterwards - merely to avoid fibril population
explosion. Otherwise, which is the usual behavior, we keep it so that
it resumes its job of a manager fibril.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    rf570cdf rc170438  
    4747#include <errno.h>
    4848#include <ipc/adb.h>
    49 #include <async.h>
    5049#include <assert.h>
    5150#include "cuda_adb.h"
     
    158157        printf(NAME ": VIA-CUDA Apple Desktop Bus driver\n");
    159158       
    160         /*
    161          * Alleviate the virtual memory / page table pressure caused by
    162          * interrupt storms when the default large stacks are used.
    163          */
    164         async_set_notification_handler_stack_size(PAGE_SIZE);
    165 
    166159        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    167160                adb_dev[i].client_sess = NULL;
Note: See TracChangeset for help on using the changeset viewer.