From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbdIVLXw (ORCPT ); Fri, 22 Sep 2017 07:23:52 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:51402 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbdIVLXt (ORCPT ); Fri, 22 Sep 2017 07:23:49 -0400 X-Google-Smtp-Source: AOwi7QCepbUphEix0YmUPSkMY6owaUha/++uvWMK+wn6fQ3Pqrjttaryhi2cyrhTB1yE3tjzhWtLlDCzbUlWwbI2Z5g= MIME-Version: 1.0 In-Reply-To: <1505302814-19313-2-git-send-email-adrian.hunter@intel.com> References: <1505302814-19313-1-git-send-email-adrian.hunter@intel.com> <1505302814-19313-2-git-send-email-adrian.hunter@intel.com> From: Linus Walleij Date: Fri, 22 Sep 2017 13:23:48 +0200 Message-ID: Subject: Re: [PATCH V8 01/14] mmc: core: Introduce host claiming by context 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 13, 2017 at 1:40 PM, Adrian Hunter wrote: > Currently the host can be claimed by a task. Change this so that the host > can be claimed by a context that may or may not be a task. This provides > for the host to be claimed by a block driver queue to support blk-mq, while > maintaining compatibility with the existing use of mmc_claim_host(). > > Signed-off-by: Adrian Hunter I think this is a reasonable intermediate step as well. I am working to kill off the "big MMC host lock" by the following plan: DONE: - Convert all ioctl() ops to custom block layer requests (done) - Convert all debugfs ops to custom block layer requests (done) - Convert RPMB access to a character device to avoid one partition switch (just merged) REMAINS: - Convert boot and "general" partitions to be part of the main block device. Because they are. (This is really tricky and may require changes in the core kernel partition handling.) - Delete the dual mode card support. (No-one seems to be using it.) - Split the world in block access and SDIO with something like a simple mutex: either the host is a block device OR it is SDIO, and that state has the same lifetime as a card, since they are now either block devices or SDIO not both at the same time. - Implement a lighter lock for SDIO host claiming. - Now the lock should be gone... As you can see it is not entirely trivial :/ Linus