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

[draft] lib.blit: Introduce API for optimized "blitter" for Virtio-net DMA #711

Closed
wants to merge 2 commits into from

Conversation

lukego
Copy link
Member

@lukego lukego commented Jan 17, 2016

Just wanted to share this fun hack for a software blitter that I am working on in connection with #710.

The idea is to isolate the virtio-net memory copy operations from the rest of the vring processing so that they can be optimized separately. See the individual commit comments for more details.

I have started to experiment with writing an optimized batch-mode version of the blitter in assembler. The initial results are encouraging but it is early days yet and I don't know which aspects of the design are important. See gist for rough notes and code.

I started looking at this in the context of debugging #665.

If there is a suitable online betting site then I am willing to wager that a suitable blit subroutine will speed up the copy operations for Virtio-net by 2x - 4x 😄 because the performance we see with memcpy seems nowhere near the capabilities of the processor.

This is a simple placeholder implementation for an optimized
bit-blitting API.
Update the vhost-user code to perform Snabb<->VM memory copies via the
lib.blit module. This allows experimental optimizations with local
changes to the blit module.

This essentially separates "virtio vring processing" and "virtio
memory copies" into being two separate problems that can be profiled
and optimized separately.

This is work-in-progress: Care must be taken not to let the guest see
that packets are available until the blit.barrier() operation has been
executed and I think this will require moving the ring index updates.
@lukego
Copy link
Member Author

lukego commented Jan 19, 2016

Closed: action has moved to #719.

@lukego lukego closed this Jan 19, 2016
takikawa pushed a commit to takikawa/snabb that referenced this pull request Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant