Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp234429pja; Fri, 22 Nov 2019 05:51:43 -0800 (PST) X-Google-Smtp-Source: APXvYqz25XHynkArbqsjRYG/vZc6xpK1bbNBMgW48y8Pbhu9wBQMnYxwLNo+DXZhIH9jL9DWz4+w X-Received: by 2002:a50:b86c:: with SMTP id k41mr1207412ede.181.1574430703124; Fri, 22 Nov 2019 05:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574430703; cv=none; d=google.com; s=arc-20160816; b=zhKNxDS48mhkXPPAppwhf9BEi+rrmdhuCAbNx0AJqx075SZZCX174eRsLPrnp5EcqN MR3PZQwKAAx2NBvqRN+8ku8rMPEvQ/CQZCXLSDLNvmHdvZcwb7S2qqAIpIJBgvj6zhX0 zyv6tlyHLwE52e9ZlFBCnBiU0Ehyx4HHkz3y4yPFCTruiAlz1sEb2FOoDbAa82CYi7Db tFepoLYGeN1i7HGFgKaquvdS44kqAOus4d/B5LZUJW/88ze9VjzhEAUCEf9di1FbRgRg 0JRN7kiIZexPNtnW7NjJVs/3rgvnbbKEla21bT//DtjIdCS95IGFlP7KLNvyyJs4dhbD dDKA== 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; bh=XhR4lIDOBURnJ5d/Ak56jRpIG0cQ5dlK3Wk70SGAf6Y=; b=DEA1y+QrnAYqXARxMEiKoM9UT6sx7Q5zk+CBbt44vpYdBZuUAhXXbgoHcwG4slo4ZJ DWqT0WyKgBgGYd2OO+IChdzrtMekhmHL8o0HAZFX7DEBitqPPKL1V4VHly5vAYXF3rAe 1ZJGdp5EJSU6AtUBFUOPwo92FDIn1CGRegW4KJUx3vPgtGPX+so84zi1Olpr1k/8LtTw 5tMvsnT1oU4Gexr0Qb5GRFKyJG7T0RXQSikN2cOSpeNighs8ipJKoYIGs08ownJNP/lJ Mo3I/mWzgU31crPEtvLMmhSvFK3xh1SWhv+hIn8ehIdY5kTvqG/N3+r4SeEH5CVlAywL F2+w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b26si4761097edc.25.2019.11.22.05.51.18; Fri, 22 Nov 2019 05:51:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbfKVNuC (ORCPT + 99 others); Fri, 22 Nov 2019 08:50:02 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:35309 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbfKVNuC (ORCPT ); Fri, 22 Nov 2019 08:50:02 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1N95mL-1hjb390sfn-016Bs7; Fri, 22 Nov 2019 14:50:00 +0100 Received: by mail-qk1-f171.google.com with SMTP id e2so6302682qkn.5; Fri, 22 Nov 2019 05:49:59 -0800 (PST) X-Gm-Message-State: APjAAAW3bKjJ0TVudyGpz+iEAw6aPURBBsMdthaSU7pSDRy1+nYcYm3E UUKyPnYYHCUoUPuOSEOOxtOlEFKLHoxBusuD5P0= X-Received: by 2002:a37:a757:: with SMTP id q84mr2719071qke.394.1574430598876; Fri, 22 Nov 2019 05:49:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Fri, 22 Nov 2019 14:49:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 0/4] Add MMC software queue support To: Linus Walleij Cc: "(Exiting) Baolin Wang" , Baolin Wang , Adrian Hunter , Ulf Hansson , Asutosh Das , Orson Zhai , Lyra Zhang , Vincent Guittot , linux-mmc , "linux-kernel@vger.kernel.org" , Hannes Reinecke , linux-block , Paolo Valente Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Tv7D5aPF3m7gli8X46lkL3LrjJZjc7FOoo/MW+i+WEq3WHXS7gw d2JfKApVJOlgSnPVjzxHSPE8wyfv8EQqgaqDJWQbUSpwvhWsOMuqbgcFrJ4eDzNGC3PEeFb v0QlQZh1Kldpt45q8Msh5zaj2mj/n2uU9Q1wYkMWV0thjRiJVyZ1TTQ0ZTFfL7MfW+UrZeS JJyNxB5uQRTyDF8RnJ1aw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:83zYc4a3aw4=:3lhuH7Pw1iw6jl6Sh5zbwM WD8ZqoDYUarhccL4mAliVJ/tT4Za00JURObyvWf7NQmTbqI3l0YEn8hK+yVj5m8k5o1hubBtg FPP21v/MkzHwiePRnrs/rMf+vuTeJbDkXHBj0Ilbfefvw1Z6t17k8BzT5RP2HaVUsueUv2qqY Qzrxw0B8NvxT2seO/2N2EiLQeaXraFLWQdjHS3GtKMrFJW7U1vv8t0XruwB7X8SYc5LErxZPy bHkQHdLRfcO7k/6TBobXrVDqfrgP2c3QFQVmmmU6+geIV1Cmq9TbTjw3m3Izj4qD7pYgoFxBc DaL114aInsX4Vf2Au1qEG3BFgRJ3V/lWc3HcDfh+SiePsEWUMZOUb+yeDPs6EaN8Qgefuvvja XRZVWR31B308P/BisZ2NQEjHQfm27w8SLhzFuaBuYN3OAso7420x3x0AQFZRsn9WdUiMzrkvh 0DzAtmzIUXnb267VgU4O+03ydEMMVrsgM8n3/eEOmeMvDx3nlOb9UMYrxAI+CLEileppzxnJS VC5usciyspCcSdb2gh40vHrhxpCr+y7Jf6Zg+E3CtqAB/iyb65NXd5O3N5a8VJ0RUvHJXidtM C84UzidPE3eNRNviIngI0em1aPR4LLVNyPYrs+SRT+6N9o4Fs7UpoOMwX3AzMtc9SDDWWl8oL grM0PgH5Sr6dhXQHqL6G43zgvF4cm8Net97ElsS4RGiCI0y2qp0kQqRLyVT1+L0wOfD7+26Ge nsw5DZpczMxZVVUePd6QolpAfJts4xU7Mgfesyv1FC60stQG4nrok7589d5u23nTV2pJwo8FT q7Vpewu5gpI0dqHCsjDqGIa/dv9DlriRLO0W0OM6hTXNQhEo4WwLcDOaxWRS4m3Td5MXxt+zd XYae+FvmBu3VMDCzQTpg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 2:20 PM Linus Walleij wrote: > > On Fri, Nov 22, 2019 at 10:50 AM Arnd Bergmann wrote: > > > I suppose to make the submission non-blocking, all operations that > > currently block in the submission path may have to be changed first. > > > > For the case of a partition switch (same for retune), I suppose > > something like this can be done: > > > > - in queue_rq() check whether a partition switch is needed. If not, > > submit the current rq > > - if a partition switch is needed, submit the partition switch cmd > > instead, and return busy status > > - when the completion arrives for the partition switch, call back into > > blk_mq to have it call queue_rq again. > > > > Or possibly even (this might not be possible without signifcant > > restructuring): > > > > - when preparing a request that would require a partition switch, > > insert another meta-request to switch the partition ahead of it. > > > > I do realize that this is a significant departure from how it was done > > in the past, but it seems cleaner that way to me. > > This partition business really need a proper overhaul. > > I outlined the work elsewhere but the problem is that the > eMMC "partitions" such as boot partitions and the usecase-defined > "general" partition (notice SD cards do not have this problem) > are badly integrated with the Linux partition manager. I think that's a totally orthogonal problem though: we may well be able to come up with a different way of representing the extra partitions to user space or as separate block devices, but in the end, this looks exactly the same to mm ->queue_rq() callback. If we have send a cmd to one partition and want to send the next cmd to another partition, we first have to send the partition switch cmd. Arnd