Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp463053imu; Wed, 16 Jan 2019 02:00:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7GugFoNgXztrm0pWNEhwq/SJkWPwjXdwpWQtkRnoBvmIy9ss4E3K0Xhh43eioOiCZB8R+w X-Received: by 2002:a63:955a:: with SMTP id t26mr8162175pgn.449.1547632840492; Wed, 16 Jan 2019 02:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547632840; cv=none; d=google.com; s=arc-20160816; b=Yel+zSqG5hzCmCOFye+wvyp3klP6DZGBrMDQ5X1BmJAzzsWJaAXCs455S8fzCj+COL U1nyPiGcWzUhqPVNaDNbkKCyfFDSxha5GVBM5+Rd6kWvw2g94BEg/NxxfCyIPogGPs+6 etDDpba/DZ6EOco19h5dHWYvlc50AE5HSNnxMGOsOLQ88DggV0zZkuTTpnnCgn/vGn49 HbtQYZ0L5dkKSSxhqqt1/U659hyvIgrhKiQqZ5Wh/NeEc6l2mAIXgWj2BxSWbF8QPNzT e8MTA5pr7Leg1lGBPAcmEYppFfQusO8vEznhBAUvveaIEZpuBENg8oolp7s3tQqVZJvp WfOQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=d/qpTkWUKHbIqMVN/Nja1akTs2mQhZuriQmcOLrPE9w=; b=nd7Pg7lTnpWSZVoaHHaM3Sm1mNyZtVD9kz4cFjAZdRP9zMvcQ0ikJjy639DV60IYQv W8+FnwnSK7qP6N+sCkFFiE+rBi3XEDt7aYRgjrSMYCNwkTFLV6E6VybrpnHhKT94IGtD WeuZclWpjVjw8rbmiSrJlVRLfNNth2aMceE8f9110PdEt6eFOjrEuuS1VF/lA6b+8BQw RKObRETJiEd4744zW2vYJVWwGkzz5dJWZw7cq4jkuy8P/b68p8K2erbF8FUJuaXxd/fg I7SlEcY+nFsxfMqdCUAI9m9FPupodLkkd6plE1UJhOyu5tdu9Dwmdo17Zgvc2UgX+NHl 7zEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=blfqMy6p; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w67si5635357pgw.84.2019.01.16.02.00.22; Wed, 16 Jan 2019 02:00:40 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=blfqMy6p; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389312AbfAOT00 (ORCPT + 99 others); Tue, 15 Jan 2019 14:26:26 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:58798 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728780AbfAOT00 (ORCPT ); Tue, 15 Jan 2019 14:26:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=d/qpTkWUKHbIqMVN/Nja1akTs2mQhZuriQmcOLrPE9w=; b=blfqMy6p3wSUH8fjZo0wlKnQ/ 1Ux4f7n3ZAB2/GpJp/iC+/Qh1Ui+YGhzLLOvZQjbn8beRlB6QZzaUDaj+rV0mlWMa7mmISaTsZAJb WeF72mSMyiMGc8rOX5Hizt6jA2j5X7kXZ93x4hZIek1fe6+kfFJdhb7GjGeLHwDN7Lm0I=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gjULs-0002M5-CB; Tue, 15 Jan 2019 19:26:20 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id BA41A1127848; Tue, 15 Jan 2019 19:26:19 +0000 (GMT) Date: Tue, 15 Jan 2019 19:26:19 +0000 From: Mark Brown To: kernel@martin.sperl.org Cc: Jon Hunter , linux-tegra , Linux Kernel Mailing List , linux-spi@vger.kernel.org Subject: Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed Message-ID: <20190115192619.GG5522@sirena.org.uk> References: <7C4A5EFC-8235-40C8-96E1-E6020529DF72@martin.sperl.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HB4mHL4PVvkpZAgW" Content-Disposition: inline In-Reply-To: X-Cookie: Violence is molding. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HB4mHL4PVvkpZAgW Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 15, 2019 at 06:39:27PM +0100, kernel@martin.sperl.org wrote: > Is it possible that the specific flash is not using the =E2=80=9Cnormal= =E2=80=9D=20 > spi_pump_message, but spi_controller_mem_ops operations?=20 Right, that's my best guess at the minute as well. > Maybe we are missing the teardown in that driver or something is > changing flags there. > grepping a bit: > I see spi_mem_access_start calling spi_flush_queue, which is calling > pump_message, which - if there is no transfer - will trigger a delayed > tear-down, while it maybe should not be doing that. If nothing else it's inefficient. > Maybe spi_mem_access_end needs a call to spi_flush_queue as well? Hrm, or needs to schedule the queue at any rate (though this will only have an impact in the fairly unusual case where there's something sharing the bus with a flash). > Unfortunately this is theoretical work and quite a lot of guesswork > without an actual device available for testing... Indeed. --HB4mHL4PVvkpZAgW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlw+M9oACgkQJNaLcl1U h9Ax0Af/aOKsziyOkq8/ZbakEdsATprCNt/E+Y0zLxAMfn9nXuaZ4a/WZJLA9hu8 TC0pZTNicwIrkIdU+ItoqssWN7NiDCR41cJEw2gDk35A9nVuwR7cJG0Vi7YbaZLH zbRRc6TUO68wEwx0lfm8njejzbtYjoos/WywKKRAs1GblvCP57MN0mjjV96/gGAz 0JXQjAFdq58kfHGPClmmgLKMCW5DYkOeMO8RudSCpVRL06uOHGfretNDGeMkLGiv 7g2dlxm/8yByb3vK21AS5UfFKj0M2I7Au6k6mTGMwxkm/GBYEtp9PqmrJ0Ru4gPl cE8Hgb0jb7c7hOzdxLPeFniKm8vFow== =0mz9 -----END PGP SIGNATURE----- --HB4mHL4PVvkpZAgW--