Re: [PATCH 3/3] drivers/tty/tty_buffer.c: use a separate kthread for low_latency

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

 



On Wed, 10 Jun 2015 07:09:41 -0400, Peter Hurley wrote:
> On 06/08/2015 05:48 PM, Steven Walter wrote:
> > On Mon, Jun 8, 2015 at 4:15 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >> On Mon, Jun 08, 2015 at 03:28:21PM -0400, Steven Walter wrote:
> >>> Ports that are marked low-latency get their own kthread that is
> >>> high-priority.
> >>>
> >>> Signed-off-by: Steven Walter <stevenrwalter@xxxxxxxxx>
> >>> ---
> >>>  drivers/tty/tty_buffer.c | 14 +++++++++++++-
> >>>  1 file changed, 13 insertions(+), 1 deletion(-)
> >>
> >> What kind of measurements have you done to show that these changes
> >> actually matter?
> > 
> > The application that benefits from this is driving a motor controller
> > card over an RS-232 link.  The userspace application that communicates
> > over the TTY needs to respond to received bytes within about 1ms.
> > Without this patch, I have observed (via ftrace) the kworker threads
> > get delayed by over 100ms,
> 
> Which is what happens when a high-prio RT thread starves the system
> (which is effectively a priority inversion with the i/o workers).
> 
> On a vanilla preemptive kernel, <10us worker latency is typical, and rarely
> over 250us (though not bounded).

Could you explain why do you expect non-RT task like kworker to have
such a low latency?  If the system is fully loaded with other non-rt
tasks, preemptive kernel or not, I kworkers will wait for every other
process to consume their time slice.  Is there anything special about
scheduling worker threads?

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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux