Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3855087imu; Mon, 28 Jan 2019 12:04:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN7dQJi2G4GY/TZ8tphLzj5xifW4x3PBn3dQWN671/P7QK4X1wXdUOhtRZRRlAfMIRD5LxFF X-Received: by 2002:a62:13c3:: with SMTP id 64mr23255784pft.93.1548705890813; Mon, 28 Jan 2019 12:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548705890; cv=none; d=google.com; s=arc-20160816; b=TJViWGWaCPPg73IRvn4eVin1n01PDBwT3prCFDr5YqM6vya+4t88jFPvVq9yWhxC0O P3TPLS+wXwWjYUgt/v1lCCKBQnq6DoAKeiiVZanfpQCUIE2upKiTJZxFKsj7n/9JYKdY ydufIOmRBj2x229mGdpL73UxO3jBpdAIZ+cSaRhUguzIIWpwJcFygsTydA+PgyOg6A6p 7uagDLfjkr6kHcF2q2w0AvtKFrqfrZdX7sulgY+1bctqRgYxJrTcxN7G9VhDi3l/NJj3 lpJvihOkSq4CSpTyeeVciOSUYOe611A5fIvQbWuJ+TEOVvOUXkKzAOeQc3NP7x5/K4Iv j0QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MA38io3UNyh5Ga/1EdayW9F9/5BuNgGrSQxRu84uXPs=; b=xqMBMGqR8QsROXk1ADoIYAIpgYMhqxSidKmYAh4irurGrOScW9Y6y7x7vKJDnZN1xZ 8ewaMgpr09xxrrCIpc4d093PfK9ZSqJtics7DASoXvub1j9g5uluALZkt1Cg6J9ByUpz u2DFntuTrGQ2APClUqyHwG0WLMgSQj3s6Acf7n7nT3a34VlUwdru9qE1yoYf/pujnHyr nkhw1fl+CbXBDqx+nffjDiuBFyp/rpQhi6izlOKezMY8/RNCHAuwkGdY0zqniZ5qvUDK osq+MQDUBr1su5zardYNG8ZWWRMr5GRxzXANaHid1VP3Vw6ww4MI5vHEDA5BBA0b5gaN DwhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gudJhnT5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g98si20353245plb.99.2019.01.28.12.04.34; Mon, 28 Jan 2019 12:04:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gudJhnT5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbfA1UDm (ORCPT + 99 others); Mon, 28 Jan 2019 15:03:42 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38450 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfA1UDm (ORCPT ); Mon, 28 Jan 2019 15:03:42 -0500 Received: by mail-lj1-f194.google.com with SMTP id c19-v6so15395040lja.5 for ; Mon, 28 Jan 2019 12:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MA38io3UNyh5Ga/1EdayW9F9/5BuNgGrSQxRu84uXPs=; b=gudJhnT5abwJ6d2/TJ9KZoBbIUCYgBwyywX0t4ZQoOIbRK/ghpkICOppYhT4fIUwKS VLKrjaASaouRWQQsmZZ57DwPUjXUpIXCSOX4CusUl/yeOqUoK5Yf7L1VWsfLzM76Scik gOOQrNog6oq/gyKTGqWe6LpG4doKNePjPbaaQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MA38io3UNyh5Ga/1EdayW9F9/5BuNgGrSQxRu84uXPs=; b=HDkR+o4I4IUdpG9O1kNT9WaQ5LzChbyFW5icjxbkmyAqI6diNopnyweYBRqBtEERRw o5+i1fTVMju365QjQGyN4qQIOKL6/oQ7j0Okve9SK2wHnrg3Py8h/A75leXcOAu4WrXa Argw3Gq34eu0vZSYmt2YIx+KvYrF26QAE1p0j/OHsxPbRWLtUbeLPOTjxBXPqp4ETDKh 3o2YURJ5B+btxitr9cPqxzSPHs2XPItNhWLouj4jlev9q3OymL5zLZcbp9p/3xA55mge 3oBUA+lrcO00vtw9jUR6/HLFND/CXsMx/fSSLaUpMtCwyliTp85nfXk6JH/9F54+so37 3+SQ== X-Gm-Message-State: AJcUukfH4PyZhUSJS1LbqKur8h7jlgB9p7tHvCY3dV2ct4y8AI7SHP9B Y9hBxo6O54wQv8Phna2vaKW9jhoYGb4= X-Received: by 2002:a2e:8605:: with SMTP id a5-v6mr17899102lji.145.1548705819979; Mon, 28 Jan 2019 12:03:39 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id f11sm3190613lfi.12.2019.01.28.12.03.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 12:03:38 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id a8so12842521lfk.5 for ; Mon, 28 Jan 2019 12:03:38 -0800 (PST) X-Received: by 2002:a19:cbcc:: with SMTP id b195mr17532840lfg.117.1548705818275; Mon, 28 Jan 2019 12:03:38 -0800 (PST) MIME-Version: 1.0 References: <20190110101232.9398-1-o.rempel@pengutronix.de> <20190110101232.9398-4-o.rempel@pengutronix.de> <20190110151953.qpat4t7lat6plfk6@pengutronix.de> <20190110163030.GB19693@kroah.com> <7a593f3b-0019-c30f-30e8-34eae7b96cf0@pengutronix.de> <20190128082313.GA15182@kroah.com> In-Reply-To: From: Linus Torvalds Date: Mon, 28 Jan 2019 12:03:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 3/3] drivers/tty: increase priority for tty_buffer_worker To: Oleksij Rempel Cc: Greg Kroah-Hartman , Jiri Slaby , Pengutronix Kernel Team , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 1:22 AM Oleksij Rempel wrote: > > Yes, I tested it with different linux-rt version with mostly similar results: Hmm. It strikes me that you use very carefully timed serial *writes* to control the laser cutter, but the flip buffer handling is mostly a latency issue on the *read* side, isn't it? Are you sure you are testing the right thing? Because your loopback test is testing the latency not of writes, but of writes _and_ reads. I'm wondering if we could/should try to simply avoid the workqueue entirely if we could do the work in process context. That's harder to do for reads - because incoming characters happen in interrupt context, but shouldn't be all that hard to do for writes. In fact, I thought we already did writes without any tty buffer flipping at all, and that your patch series shouldn't actually affect any write latency, but I've happily not had to work much with the tty/serial layer in years.. Do you actually have read latency issues? Or is this whole series perhaps an artifical effect of the benchmark you use? Linus