From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: References: From: Linus Walleij Date: Sat, 15 Apr 2017 20:34:48 +0200 Message-ID: Subject: Re: Outstanding MQ questions from MMC To: Avri Altman Cc: Arnd Bergmann , Ulf Hansson , "linux-mmc@vger.kernel.org" , "linux-block@vger.kernel.org" , Jens Axboe , Christoph Hellwig , Adrian Hunter , Paolo Valente Content-Type: text/plain; charset=UTF-8 List-ID: On Fri, Apr 14, 2017 at 8:41 PM, Avri Altman wrote: > [Me] >> 2. Turn RPMB and other ioctl() MMC operations into mmc_queue_req >> things and funnel them into the block scheduler >> using REQ_OP_DRV_IN/OUT requests. >> > > Accessing the RPMB is done via a strange protocol, in which each access is comprised of several requests. > For example, writing to the RPMB will require sending 5 different requests: > 2 requests to read the write counter, and then 3 more requests for the write operation itself. > > Once the sequence has started, it should not get interfered by other requests, or the operation will fail. So I guess currently something takes a host lock and then performs the 5 requests. Thus we need to send a single custom request containing a list of 5 things to do, and return after that. Or do you mean that we return to userspace inbetween these different requests and the sequencing is done in userspace? I hope not because that sounds fragile, like userspace could crash and leave the host lock dangling :/ Yours, Linus Walleij