Re: Locking and interrupt handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On 17:20 Thu 17 Sep     , Leonidas . wrote:
> Hi List,
> 
> I am aware of the fact that in interrupt context one should not use
> mutexes/semaphore
> and should stick to spinlocks.

Yes, exactly.

> I am developing a module which exposes interfaces which could be called from
> any/all
> contexts. And I manipulate complex data structures in my functions. Being on
> safer side
> I should stick to spinlocks. But in most of the cases it would not be
> needed, meaning my
> functions would get called mostly from process contexts, so spinlocks sounds
> wasteful
> since my critical sections are long and painful.

Is there any way to view your code?

1) Executing long functions in interrupt context is bad, because this
introduces latencies into the system. Try to put at least the big functions
into a workqueue.

2) You can try to remove the locking outside of this module and make it the
responsibility of the module user.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux