Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4228242pxb; Tue, 10 Nov 2020 10:56:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjJLJB9t1K64xV1KiMvZiCdr/+spx4QIrmd7/wPDwunts0zOgy12Mxh3MJLSHSacnLZ5jB X-Received: by 2002:a17:906:fcc2:: with SMTP id qx2mr22206436ejb.549.1605034592158; Tue, 10 Nov 2020 10:56:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605034592; cv=none; d=google.com; s=arc-20160816; b=p8F8H9Dbwla4VQq2c2H/DNaz1CihWdx2IQyfROPFHd8StuQcwPgY18Tavc83ERtk+A xOc+IQhjxPnLb/TxLird/NV0BOHQrB6CBhAwbTV+S4dAio3isMV1TJzK+MrP56XTAEgM BhH5Iu0ABJE3Z/DfnfFk5XCD4X48k6LHn4gAB0HkW5ZoBEvVDLyKliMPGsGVLkgbEiM1 i0zBM09Qe+c+44eWZsDkUYdmPrVZ+xH4gXiY9ovNTh2UEGn0RVBCqSI5SpWz6I3dSh49 /cMvb0HEtpMtdcrdNy6IE625szltCGKKO2r0IEZWQX8sPwLQCj3qe1WXuaLHiQZIuSKY JGGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dmarc-filter:sender:dkim-signature; bh=2kmNg+DcYCP30cdie56V5OYbK+DXzLqPEuc1mLQCzB0=; b=blkuA00/zfxoeXHKmv9BhODezLm7lnLUsTQgseK1e41ge5oYkqdLvup++0C3po/bMo 2k/CzUaq4xPtHuU/vziioguaGhEJjozKiK7ADR6V8CGQPdbGA3nM1kr3NcVPziLvZ7BY ubjvTne6SviE7aM4nZpWaASEmi4NZT0vqrgEWzRM56MLLZ+dETLjYVu0WNYe/wotYTtp KA6+U6kHJt4fjv0PgT6QnXwE44SusT85uVhaoNeC1g7ZTopiwCUkRHv3a2yFq2ahOE0/ iOGB3C7XVKg5NlheqS5v+sqRd6KsmUAaevRpNTs1DYKs9T3uqGhxfr5Jf9K3Iz9tdlSI q5Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=MmJ5hnJO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si9512189ejc.351.2020.11.10.10.56.07; Tue, 10 Nov 2020 10:56:32 -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=@mg.codeaurora.org header.s=smtp header.b=MmJ5hnJO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731263AbgKJSz7 (ORCPT + 99 others); Tue, 10 Nov 2020 13:55:59 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:32007 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgKJSz5 (ORCPT ); Tue, 10 Nov 2020 13:55:57 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605034556; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=2kmNg+DcYCP30cdie56V5OYbK+DXzLqPEuc1mLQCzB0=; b=MmJ5hnJOYVGBAgLIoVDqD+UIaG+j4fuaq3QZ8xW6MiWBgqIcq0iHAgUtXThGuw2MfLMwXMxf tU4ihMCPPOkUjFL8254kxf52Flg7luQ5uCnMHsyoCSnmP6LdNrW0N0FDYa0EnUyaD2Yaz844 B67EgqSEA+8UYJ1RT0kNCaiS08o= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 5faae22734c4908d191fedc3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 10 Nov 2020 18:55:35 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 12EA1C4339C; Tue, 10 Nov 2020 18:55:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, MISSING_DATE,MISSING_MID,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id EF0E1C433C6; Tue, 10 Nov 2020 18:55:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EF0E1C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/2] rsi: Move card interrupt handling to RX thread From: Kalle Valo In-Reply-To: <20201103180941.443528-1-marex@denx.de> References: <20201103180941.443528-1-marex@denx.de> To: Marek Vasut Cc: linux-wireless@vger.kernel.org, Marek Vasut , Angus Ainslie , "David S . Miller" , Jakub Kicinski , Lee Jones , Martin Kepplinger , Sebastian Krzyszkowiak , Siva Rebbagondla , netdev@vger.kernel.org User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.5.2 Message-Id: <20201110185534.12EA1C4339C@smtp.codeaurora.org> Date: Tue, 10 Nov 2020 18:55:34 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 > Tested-by: Martin Kepplinger 2 patches applied to wireless-drivers-next.git, thanks. 287431463e78 rsi: Move card interrupt handling to RX thread abd131a19f6b rsi: Clean up loop in the interrupt handler -- https://patchwork.kernel.org/project/linux-wireless/patch/20201103180941.443528-1-marex@denx.de/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches