Multthreading with netfilter?
From: [AvataR] <hidden>
Date: 2009-07-09 17:15:21
From: [AvataR] <hidden>
Date: 2009-07-09 17:15:21
I need to do difficult processing of IP packets. For speed up, I want to process parts of packets in different kernel threads. I start n threads (n = CPU count -1) in module initialization part, and make them waiting (I use semaphores and self-made queue). At nf_hook I add tasks to queues and up() threads. As I in atomic context in nf_iterate, I do in main thread computations, and then wait for threads done with while() loop without scheduling. The problem is: other threads sometimes don't wake up after up(). Sometimes, when I press Enter key (SIC!) threads wake up, sometimes not. Is there any right solvation for this problem?