From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f179.google.com ([209.85.223.179]:44189 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbdJZOZQ (ORCPT ); Thu, 26 Oct 2017 10:25:16 -0400 Received: by mail-io0-f179.google.com with SMTP id m16so5760718iod.1 for ; Thu, 26 Oct 2017 07:25:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1508834428-4360-1-git-send-email-adrian.hunter@intel.com> From: Linus Walleij Date: Thu, 26 Oct 2017 16:25:15 +0200 Message-ID: Subject: Re: [PATCH V12 0/5] mmc: Add Command Queue support To: Adrian Hunter Cc: Ulf Hansson , linux-mmc , linux-block , linux-kernel , Bough Chen , Alex Lemberg , Mateusz Nowak , Yuliy Izrailov , Jaehoon Chung , Dong Aisheng , Das Asutosh , Zhangfei Gao , Sahitya Tummala , Harjani Ritesh , Venu Byravarasu , Shawn Lin , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org On Thu, Oct 26, 2017 at 3:49 PM, Adrian Hunter wrote: > On 26/10/17 16:32, Linus Walleij wrote: >> My patch series switches the stack around to make it possible >> to do this. But it doesn't go the whole way to complete the requests >> from interrupt context. >> >> Since we have to send commands for retune etc request finalization >> cannot easily be done from interrupt context. > > Re-tuning and background operations are rare and slow, so there is no reason > to try to start them from interrupt context. OK I will try to get them out of the way and see what happens, hehe :) What I mean is that we were checking - on every command - if BKOPS or retune needs to happen. And then doing it. Thus all was done in process context. >> But I am thinking about testing to hack it >> using some ugly approaches ... like assuming we don't need any >> retune etc and just say all is fine and optimistically complete the >> request directly in the interrupt handler if all was OK and wait >> for errors to happen before retuning. > > It already works that way. Re-tuning happens before you start a request. > We prevent re-tuning in between dependent requests, like between starting a > transfer and CMD13 polling for completion. Ah that is what these if()s do ... right. I'll see if I can get around this then. Yours, Linus Walleij