Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1375773pxb; Wed, 4 Nov 2020 07:23:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZhq6LQ6ivvCbJCVcs0IMHnwyhuCbanDzdTD5gk/ikVxaY+cSckubqRtSQpi+NkdAommyk X-Received: by 2002:a50:eb87:: with SMTP id y7mr6384659edr.187.1604503386741; Wed, 04 Nov 2020 07:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604503386; cv=none; d=google.com; s=arc-20160816; b=qtoL/5R4NYjNE00CejC8AloryyWBz1MZnzgaM6qF0MOS1cwqDdCg0gXuXQSMzV5Au+ 4C347FRwoJWZFdn+SGKEjVyqLLqixuXPGcOsOiZI6ALfMZeEBJV/YkeHK0uscFymrZZ3 4fWqPs8fPfwQkNWrZJDmQjhaNLeQ4RSo12yUmYJKhNSsJoKHt8X+/ew3vRtBxAafsjiB vtRoLE3XhjnxzLrmOvJ+1vYYhd8BYQB35zdHppWqaMAD6raZDjSJ3ieUva1ztFJ/lwMz buCvHv+TCm0GRpWU9+l8lbLJ+7gp26/PZsxGRAby6pnuZM6hAzOamo0HJtOkxIHNvzwH /qWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kVLqlJEsMMWZuegWV3q3hZOaSw5B73PN1b6vyPUYU0c=; b=Ww5fiWHHPg8nu5+9DN5+/nnVkflDeMfLfXIrHtyOLLCJWDtN77Hmdjn0N2jFux9qD2 4Nl8bCHUKZSTQzIzIOHiVE1WDyRAsyA724Y1oLvsJ7oSYN/6oTmhRFDnHVLRyQSx42p+ PBh2EOg+VXWzTBfpt5ZJaeP0V7MgL5elwY7VSGhb22KsckBzGdZi6Hzuahrv1mbzdsHZ 6FHt+DWZVeppOqzsOD54cjkNoNeGYWy4nphzJULhJPPz8CxwsLBccxSDKX+7q/dqLwO5 /hLGM/OuQ2D6g4OUyFJUfierodmFCAqVwjwmgfMqd6ldKpjjTKarShYepoktfooXwi1I AkzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=TEjSl4C2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si1425399edt.484.2020.11.04.07.22.29; Wed, 04 Nov 2020 07:23:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=TEjSl4C2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730466AbgKDPVx (ORCPT + 99 others); Wed, 4 Nov 2020 10:21:53 -0500 Received: from mout02.posteo.de ([185.67.36.66]:59861 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730750AbgKDPVx (ORCPT ); Wed, 4 Nov 2020 10:21:53 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D24A82400FB for ; Wed, 4 Nov 2020 16:21:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1604503310; bh=YyoGNxPEtZTBMBKDNxVmymxRbElJ86keMPNynE37mMI=; h=Subject:To:Cc:From:Date:From; b=TEjSl4C23DLeqH0ZH7lgrDfKiVnkkPvJab+b5C/wGr57ZbixEcb7iDhqpsrf4v49w RPAhHMWNyx5W8P1YyQpj7CiCJ4t1E0WE+DaV/ZiU7527SvY40f+Tr6uAlXO5maCN7E 5qN25/tAKCYoXBdCHt1QnZH6qFmctoU6kwC9b6/5JJFvHCBZq0mJdlFEjSdj6i3OtN zjDh1kzJkJFaVYLcDYeXn8ukMwhfvxXxDPlV+qgXzLWbDxsscLpEX6AfWN5FzEmE4G ToRg5Atysm3xj5bIEbBlczNUc2J8bz+49nFbkKTOKsIoSwt73UB0v07VOqhmVSyuQK ar232FFxBqigQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4CR9Nq4GlJz9rxq; Wed, 4 Nov 2020 16:21:47 +0100 (CET) Subject: Re: [PATCH 1/2] rsi: Move card interrupt handling to RX thread To: Marek Vasut , linux-wireless@vger.kernel.org Cc: Angus Ainslie , "David S . Miller" , Jakub Kicinski , Kalle Valo , Lee Jones , Sebastian Krzyszkowiak , Siva Rebbagondla , netdev@vger.kernel.org References: <20201103180941.443528-1-marex@denx.de> From: Martin Kepplinger Message-ID: Date: Wed, 4 Nov 2020 16:21:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201103180941.443528-1-marex@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 03.11.20 19:09, Marek Vasut wrote: > The interrupt handling of the RS911x is particularly heavy. For each RX > packet, the card does three SDIO transactions, one to read interrupt > status register, one to RX buffer length, one to read the RX packet(s). > This translates to ~330 uS per one cycle of interrupt handler. In case > there is more incoming traffic, this will be more. > > The drivers/mmc/core/sdio_irq.c has the following comment, quote "Just > like traditional hard IRQ handlers, we expect SDIO IRQ handlers to be > quick and to the point, so that the holding of the host lock does not > cover too much work that doesn't require that lock to be held." > > The RS911x interrupt handler does not fit that. This patch therefore > changes it such that the entire IRQ handler is moved to the RX thread > instead, and the interrupt handler only wakes the RX thread. > > This is OK, because the interrupt handler only does things which can > also be done in the RX thread, that is, it checks for firmware loading > error(s), it checks buffer status, it checks whether a packet arrived > and if so, reads out the packet and passes it to network stack. > > Moreover, this change permits removal of a code which allocated an > skbuff only to get 4-byte-aligned buffer, read up to 8kiB of data > into the skbuff, queue this skbuff into local private queue, then in > RX thread, this buffer is dequeued, the data in the skbuff as passed > to the RSI driver core, and the skbuff is deallocated. All this is > replaced by directly calling the RSI driver core with local buffer. > > Signed-off-by: Marek Vasut > Cc: Angus Ainslie > Cc: David S. Miller > Cc: Jakub Kicinski > Cc: Kalle Valo > Cc: Lee Jones > Cc: Martin Kepplinger > Cc: Sebastian Krzyszkowiak > Cc: Siva Rebbagondla > Cc: linux-wireless@vger.kernel.org > Cc: netdev@vger.kernel.org > --- > drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +-- > drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 52 ++++++--------------- > drivers/net/wireless/rsi/rsi_sdio.h | 8 +--- > 3 files changed, 15 insertions(+), 51 deletions(-) hi Marek, I'm running this without problems, so feel free to add Tested-by: Martin Kepplinger to both of your changes. thanks a lot, martin