Re: [PATCH V8 01/14] mmc: core: Introduce host claiming by context
From: Linus Walleij
Date: Fri Sep 22 2017 - 07:23:56 EST
On Wed, Sep 13, 2017 at 1:40 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> 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 <adrian.hunter@xxxxxxxxx>
I think this is a reasonable intermediate step as well.
I am working to kill off the "big MMC host lock" by the following
- 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)
- 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
- 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 :/