Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1115693yba; Tue, 2 Apr 2019 02:37:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9e6YKqTsCZ/2r8HsX4UTzy7CK4RY6TtrGi/h2efWRq9Y3ZdkMDaUwpBWI1gdV2ZPKTlvc X-Received: by 2002:a17:902:266:: with SMTP id 93mr70347170plc.161.1554197821732; Tue, 02 Apr 2019 02:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554197821; cv=none; d=google.com; s=arc-20160816; b=wYtNKVAqHNrxMbWQdJD6RlvNeXdJmZLeuJTXTOKlkuyx64bglCZY3yW7jcnLgBNMoO hBmmlwGTr7NCHRasDMqzH0GddcKXi93QQrrevwqvXj9+9hGGuj+hVhj2vPDNPeOTF/vI OzUCUE1LnoQgghdVKlsSx+MIeGbMxpH5nLNpUIn/2JCkod4JE+PDng6tBnoUBmCvMqPD xxb+NPMr5slETmD+hHf0PUoy+91rlBpBcAMJW0/ZpBz0DN/DYo8MGC4V5dU23A5NuDa3 BDM5Gv1gR0K0Bi4pKrF1GpwB54uSinYlAM+QeofMSsR/zb8CxtLRhlGh5NfPbPqeT9/p 5HCg== 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=PQtR22IfGnpW+4UD8rHmpQlgcjqz35SLOcrjDxw9uB0=; b=dzRLRfAxfdTkn1DvDmbSu2AYc9s9y1VkYaySklIowOSD1C89se55ey0YRc6Lw9J5db SWJjBODOgUtWWbwzUp0SPsKpWWUt0AHE/WVR6AxQ39/TgZbMryo4zEgkiGasK2zQje+X ejtk07dupDmpZXm6hwL8K2kVcwnQrrMwQOW8gp7ErsmWcyvzLm3N8NSeScMV4XPgD+bg BAWKf8bf5Usa/MyqDFJEwQlMOOsC2uGTIcfvbptmFFmarFGMHr9yuVjCivp2g1Ifu37z bJ1BSy5pry2XKXPbqqNzxbmyGHatHjGXXJcAAWwB2w52nU3L2E7A5rRJdZxMACgW95CW K3NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ogJNGOM0; 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 y1si11340954plb.276.2019.04.02.02.36.46; Tue, 02 Apr 2019 02:37:01 -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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ogJNGOM0; 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 S1729763AbfDBJKN (ORCPT + 99 others); Tue, 2 Apr 2019 05:10:13 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:49222 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729162AbfDBJKN (ORCPT ); Tue, 2 Apr 2019 05:10:13 -0400 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=PQtR22IfGnpW+4UD8rHmpQlgcjqz35SLOcrjDxw9uB0=; b=ogJNGOM02Dyx7WFRUUxxL78PO Op7JXiRheKKf4vNXPhChJnnzTcUG1r/rkgiiyp8c9lW0o4GWSt1mMksmvA1yLvjDDghsvKytlYQtu CzfotaPeYqIIb09qX9uIespYhjGLAueSApZx6mGLi3gTPIQQ6susw3QPT/tjQU0y9T05E=; Received: from [147.50.13.10] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBFQm-0006lO-Sc; Tue, 02 Apr 2019 09:10:09 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id EB5F2440082; Tue, 2 Apr 2019 10:10:05 +0100 (BST) Date: Tue, 2 Apr 2019 16:10:05 +0700 From: Mark Brown To: Rasmus Villemoes Cc: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Fabio Estevam , Rasmus Villemoes Subject: Re: [RFC PATCH 0/4] spi: spi-fsl-spi: try to make cpu-mode transfers faster Message-ID: <20190402091005.GC2059@sirena.org.uk> References: <20190327143040.16013-1-rasmus.villemoes@prevas.dk> <20190401073450.GG2059@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U58U7wle/RT11wuz" Content-Disposition: inline In-Reply-To: X-Cookie: Use extra care when cleaning on stairs. 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 --U58U7wle/RT11wuz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 02, 2019 at 08:43:51AM +0000, Rasmus Villemoes wrote: > Thanks! There's one other option I can think of: don't do the interrupts > at all, but just busy-wait for the completion of each word transfer (in > a cpu_relax() loop). That could be guarded by something like > 1000000*bits_per_word < hz (roughly, the word transfer takes less than 1 > us). At least on -rt, having the interrupt thread scheduled in and out > again easily takes more than 1us of cpu time, and AFAIU we'd still be > preemptible throughout - and/or one can throw in a cond_resched() every > nnn words. But this might be a bit -rt specific, and the 1us threshold > is rather arbitrary. Yeah, that's definitely worth exploring as a mitigation but obviously with things like flash I/O that gets a bit rude. Hopefully what's there at the minute turns out to be robust enough. --U58U7wle/RT11wuz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlyjJu0ACgkQJNaLcl1U h9AQpwf+OuW45aY1671qbCW3I/2+1Z2PuTbheg08DkMzK9IQ6qmkz9Web828TcQk Wh+mr066jfLo2rf2NL3Ed2/zu4Y1GPn4wtqblsg1Jl2UsRGk+V4Eb27iaj6szvU2 GenjVXF7zia3xVVw5ISh5IKVnko+rRZnatuusPffejsXoRrtiG5gN3W9EJH6+oK3 b6BIPgQBqS0/de54NjVFthmd5X24fGwRfi2DkMwtN/W1k2Y8/bTQwTY+z5lepLRU pM83mhetp3X1jZAt4KwjGlKmE4ATaU3Q8bDwOwTCyhyRMxDtUkts7pcyf1uez/rh X3OwafCkR2xlVNqfRPt/mepvxntvLg== =dmgT -----END PGP SIGNATURE----- --U58U7wle/RT11wuz--