Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp922700ybe; Thu, 19 Sep 2019 06:06:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZCPeeDReoY2qkSOBEJbJbZyu+xfcN4QFIw7bLrsaeWIp82me0YXwoAG21W2UH7E5XiedC X-Received: by 2002:a05:600c:2252:: with SMTP id a18mr2919343wmm.141.1568898388534; Thu, 19 Sep 2019 06:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568898388; cv=none; d=google.com; s=arc-20160816; b=HckDNS+cdzxNeD5DVGFZlZ62nv6v9ZRQoKiuRgbmV6dz+QEk6CuIzmw4OLjPfSyxQT vdvv/9224gqZ+NQTbBdhemlET5WiSa3en7vkBtFJ7R6BwFx3nlk/AzlHHOLxXAaleiXJ XYr0knTw2d7vu2u6fHziheHRowMxXHPVw3uIMlKDsgkvWqxJhxKoTYP5aG7foM8QRsWl Nx/9QN3gCybPupeJEtb/hQZAsi9u4kbghPzLmvsWQ8N+iujhyHKlVt4PaeKELiTjVYDX kcHOjZEKBq3LLLM/8lGI0+Lv1QRd4upBW6uKt8vZW8lCT69G7RBsKuw2rtdzXOKw4phF UAVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=f3W3FK1p6QfYStBI/Azwg9Q/o1/yhdQP/aGjeIE5lIY=; b=JvpJGewEVTyJBntKlW7j1XSKgYpQlEfTSxpXkFfTZnfIYamJbjVHJAcrR+bO8bP/w1 g0sdiq2n+3Vq591SZD9z+nkklCmKs70qgkWH5zOYs1tVgIpSfb1UKzLI3M9nMw7FnGmr wPa5KJW/AZcoE5EjAjvdKIuZQWTmLZzRUC6H9fGBUvQo2EBN3vXZmkH49bCwSpq7gD53 tdjYzoLSNJZZQVufQ+Cykdo9rBcZaUJ4nEWK7S2KQqCpi+f6zGXgGkD6YlgpFXgwq2SU 930uq0hCWidxhJ3w8dIeYTK7kGsqBz1P6PydK5oxO4JQa2Au+KuxPXb56l1Jo6E1Zm9X oXzg== ARC-Authentication-Results: i=1; mx.google.com; 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 br19si4427856ejb.43.2019.09.19.06.06.01; Thu, 19 Sep 2019 06:06:28 -0700 (PDT) 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; 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 S2389793AbfISLW1 (ORCPT + 99 others); Thu, 19 Sep 2019 07:22:27 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:50739 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389453AbfISLW0 (ORCPT ); Thu, 19 Sep 2019 07:22:26 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iAuVu-0002Bi-B8; Thu, 19 Sep 2019 13:22:18 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iAuVs-00035s-QK; Thu, 19 Sep 2019 13:22:16 +0200 Date: Thu, 19 Sep 2019 13:22:16 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Philipp Puschmann Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, yibin.gong@nxp.com, fugang.duan@nxp.com, l.stach@pengutronix.de, jslaby@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] serial: imx: adapt rx buffer and dma periods Message-ID: <20190919112216.qjkx5wvqhsadjxg5@pengutronix.de> References: <20190919102628.23621-1-philipp.puschmann@emlix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190919102628.23621-1-philipp.puschmann@emlix.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 19, 2019 at 12:26:28PM +0200, Philipp Puschmann wrote: > Using only 4 DMA periods for UART RX is very few if we have a high > frequency of small transfers - like in our case using Bluetooth with > many small packets via UART - causing many dma transfers but in each > only filling a fraction of a single buffer. Such a case may lead to > the situation that DMA RX transfer is triggered but no free buffer is > available. While we have addressed the dma handling already with > "dmaengine: imx-sdma: fix dma freezes" we still want to avoid Is this statement still true now that you split this patch out of your bigger series? > UART RX FIFO overrun. So we decrease the size of the buffers and > increase their number and the total buffer size. What happens when such an RX FIFO overrun happens? Are characters lost? Or only time? Does your change have an influence if I do fewer but bigger transfers? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |