Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coremmc multiblock support #351

Closed
wants to merge 5 commits into from
Closed

Coremmc multiblock support #351

wants to merge 5 commits into from

Conversation

jnippula
Copy link

@jnippula jnippula commented Feb 7, 2025

Summary

Improve write performance of coremmc sdio driver by enabling multiblock transfer.

Impact

Multiblock transfer requires CONFIG_MMCSD_MULTIBLOCK_LIMIT to be defined according to coremmc
internal buffer size. The unaligned user buffer handling limits the block count to 8 due to 4K aligned buffer.

Because FAT_DMAMEMORY and FAT_FORCE_INDIRECT feature flags are disabled to enable multiblock transfer the emmcsd sdio driver shall also handle unaligned transfer buffer.

@@ -416,8 +416,6 @@ config MPFS_EMMCSD
select ARCH_HAVE_SDIO
select SDIO_BLOCKSETUP
select SDIO_DMA
select FAT_DMAMEMORY
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with kernel mode? If I remember correctly we had to enable FORCE_INDIRECT and for that we needed FAT_DMAMEMORY, because otherwise the MMC driver and/or MMC DMA would write directly to user space memory. DMA only works with physical addresses (and user addresses are virtual) so this fails miserably.

FORCE_INDIRECT makes the file system read the media in 512B blocks, which are properly aligned AND DMA safe! These 512B blocks are then moved to the user buffer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this does not work in kernel mode as such. So, change not usable.

@jnippula jnippula marked this pull request as draft February 10, 2025 08:25
@jnippula jnippula closed this Feb 10, 2025
@jnippula jnippula deleted the coremmc-multiblock branch February 14, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants