Re: High 50us+ latencies in the process signal handling path

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

 



Ankita Garg wrote:
Hi,

There is a testcase called 'pthread_kill_latency' under the rt-test suite on the the RT Wiki:

http://www.kernel.org/pub/linux/kernel/people/dvhart/realtime/tests/rt-test-0.3.tar.bz2

Description of the testcase: The test measures the latency involved in sending a signal to a thread using pthread_kill. Two threads are created, receiver thread (thread1) and sender thread (thread2). Before sending the signal, it waits for thread1 to initialize (thread1 waits by calling sigwait), notes the time and
send pthread_kill signal to thread1. thread1 notes the time it receives the
signal. The maximum and the minimum latency is reported. This is repeated
about 10000 times.

I'm looking at the source. The receiver thread runs with realtime priority (it's created with create_fifo_thread), but the sender thread (thread2) doesn't (create_other_thread). The sender does:

       /* Record the time just before sending the signal */
       begin = rt_gettime();
/**** The sender can get preempted by anything right here ! ****/
       if ((ret = pthread_kill(PTHREADOF(target_thread), SIGNALNUMBER))) {
           printf("pthread_kill returned %d\n", ret);
       }

Can this explain it?

Michal

-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux