Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5516836ybl; Tue, 10 Dec 2019 07:18:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzxYtGAJ+5IPmqP6xpsZFpszH6uPfsWahfW5nC5LVPEugBvmzg9kzZDkl8mgcv+nGSDLmDX X-Received: by 2002:aca:3456:: with SMTP id b83mr4448653oia.82.1575991134770; Tue, 10 Dec 2019 07:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575991134; cv=none; d=google.com; s=arc-20160816; b=HhfwvwsaLzzrpxDYJ0HJZFaiyfLW81QmQHMdPvjHA1jrhm5pr61xAk7IsqFH3Z+YaB buB3DTTqqn+Z8vcfu6niTIIh1p4L3KrlEOe2NRwZeJGCKTAl/oArV89LWXLecXJHY3kd nMColdT7wOa6mASv9CEl5kvXVHWT8LXZgLzZpli7PrkTX3KOukoDyGuPWA0Q/C14BHFM yMFeJ01V5Lp6aoH7u0Y6k8tVXm4b4UjtbuVWrEY+jCKBdvDwGMxs7KCE19IqCoTo80V+ N2J9BtbqnZvZKxhKAkSxGE5upRi/w+b8YgfoFrWspyQEW+Nq+ebK+GHR+NiwtIvpr5dj ZKbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jcUnC0/SEm4HDTIw1YLkWhbNF7DV2HNNDkdfVlTygbE=; b=jX66zkiyGBAIL+kuxtaHugNqx2uFGMZAtc+D4icVBwJ1tiqMl8EBT8ttm3kTRcerfX DGlnG+BNMgfEI8iH3K2nZxn0XAw0P8/dwDI5uQEjzb+x515S8P6WsBIfVRlGCGm1c5Aj vBmQhm2P5XNTaT7HoxCjR+RSZmLEwxJSW6nFUi+69F1xsQ8z2OxueFP5cYXAbYi5tH+L MSvhx1l3kyO7wRYOZb6FWWSWHLdhcgFBMDcUic2OTbL5mVWeM5hmfD56LXHsexxjc5Zc PTUXJW/G07d7vySLEAWKax38/locjcBWu8tie/88+FtxdbLqR0/rSL3SHLOtc+hpIBDb /vtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cSSUpZLt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si1893746otl.138.2019.12.10.07.18.41; Tue, 10 Dec 2019 07:18:54 -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=pass header.i=@linaro.org header.s=google header.b=cSSUpZLt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727587AbfLJPSG (ORCPT + 99 others); Tue, 10 Dec 2019 10:18:06 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:43205 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbfLJPSG (ORCPT ); Tue, 10 Dec 2019 10:18:06 -0500 Received: by mail-vs1-f65.google.com with SMTP id x4so13282701vsx.10 for ; Tue, 10 Dec 2019 07:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jcUnC0/SEm4HDTIw1YLkWhbNF7DV2HNNDkdfVlTygbE=; b=cSSUpZLtf+hCVZvTD7HbKKL/zq4Rkmgcb2lIlIkDlhoxjyGVl0vVSnKlyJSar8oMju kJKrdwjxQ132req2y4+nrrVfisVcDFp//Vza1JYfv88Pn0pawYqigZnVIjKe8hsBLtwo MCeVhuUG+FD6AVkT5efECIF5yoeCURQPE8pK5mLLWFQv5VUdlsUYexM/XG4pBnG0lMlj homajns2YyoPkCVbVSABDLsSQp/B9WvdKRwStVCpME0KK4gfjaFWk6c6Sp+tT9WhGfwd Wm0n+fvhFn2WYXhdCvCyA4aduw0ySOsjxw4ZHQ5FAt3egnPm7ELrA47hNqGA3SWWB7Yy x0ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jcUnC0/SEm4HDTIw1YLkWhbNF7DV2HNNDkdfVlTygbE=; b=MGi5lCJR+xlNJ5qbuusPx+I5vH3nrGX8Jduddj68TAlz7MwugsQXP8NODVRPIqKd43 XtSfiRCcUNvRAt1uW9SwPlvLKzvcJVsIILk83o15XivQ0EWPqAMDfVQW6HGgyiKW3tov YHFyfW3aMMfaMickzzGi1Ry/OUYva9sCl7boUhfSYeqs7br61d4rwRV10b9sSfAznyqv BHLv3N0nXF0cpMr6QN8ubsqOtC+jBb5dV5TubqVXcXg2za/EYRJkvZGlX19kiwIAvjLy dbU+4AqvW8zDkmBBVSDhuuuiDXLQ9odQboQeUyYWZbaTD9yQHDdl/VCCR7zrTxqaMI87 K90w== X-Gm-Message-State: APjAAAXAKHCP4WJvfPBkck6ePsGHCoCSZfrdi4G7qijM6rXn5owVt5DS e9nmUcOa/LTRC8Ws3kOK+ZU/Dh2IzNhGDYTnjGkgQQ== X-Received: by 2002:a05:6102:5d1:: with SMTP id v17mr25314853vsf.200.1575991085086; Tue, 10 Dec 2019 07:18:05 -0800 (PST) MIME-Version: 1.0 References: <20191127090023.GA23040@infradead.org> In-Reply-To: From: Ulf Hansson Date: Tue, 10 Dec 2019 16:17:28 +0100 Message-ID: Subject: Re: [PATCH v6 0/4] Add MMC software queue support To: Arnd Bergmann Cc: Christoph Hellwig , Hannes Reinecke , "(Exiting) Baolin Wang" , Baolin Wang , Adrian Hunter , Asutosh Das , Orson Zhai , Lyra Zhang , Linus Walleij , Vincent Guittot , linux-mmc , "linux-kernel@vger.kernel.org" , Hannes Reinecke , linux-block , Paolo Valente Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Nov 2019 at 13:01, Arnd Bergmann wrote: > > On Wed, Nov 27, 2019 at 10:00 AM Christoph Hellwig wrote: > > > > On Tue, Nov 26, 2019 at 12:17:15PM +0100, Hannes Reinecke wrote: > > If requests are batched enough we could just drain > > and switch every time an other partition access comes in. Especially > > so if people only use partitions for boot partitions and other rarely > > used areas. > > We only support a single user partition plus up to two boot partitions that > are accessed rarely, I don't think there is any reason to optimize switching > between them. I agree. However, let me just add some more information to this. There are more partitions, like the RPMB for example. In regards to partition switching, after serving a request to the RPMB partition, we always switch back to the main user area. I think that is sufficient. Also note that requests for the RPMB partitions are managed via REQ_OP_DRV_IN|OUT. > > The only change that I think we need here is to change the partition switch > from something that is done synchronously during ->queue_rq() to > something that fits better into normal scheme of sending a cmd to > the device, returning BLK_STS_RESOURCE from ->queue_rq. You want to translate them to be managed similar to REQ_OP_DRV_IN|OUT, no? I am just trying to understand what this would help us with, but I don't get it, sorry. I realize that I am joining the show a bit late, apologize for that. But it seems like you are forgetting about re-tuning, urgent bkops, card detect, SDIO combo cards, etc. For example, re-tuning may be required because of a CRC error on the previously sent transfer. Thus re-tuning must be done before serving the next request. Likewise, when the device signals urgent bkops status, we must not serve any new request until the card has notified us that it is ready with it's internal housekeeping operations. > Possibly this could even be turned into a standard struct request that is > added between two normal requests for different partitions at some > point, if this simplifies the logic (I suspect it won't, but it may be worth > a try). Doing so, means re-tuning, bkops, etc, also needs to be managed in the same way. Is this really the way to go? Kind regards Uffe