* [LSF/MM/BPF TOPIC] Rust block device driver APIs
@ 2024-01-29 13:17 Andreas Hindborg (Samsung)
2024-01-29 15:40 ` Hannes Reinecke
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Hindborg (Samsung) @ 2024-01-29 13:17 UTC (permalink / raw)
To: lsf-pc
Cc: linux-block, rust-for-linux, Jens Axboe, Keith Busch,
Matthew Wilcox, Damien Le Moal, Daniel Wagner, Hannes Reinecke,
Christoph Hellwig, Wedson Almeida Filho, Boqun Feng,
Andreas Hindborg, gost.dev
Hi All,
I would like to propose a session on the Rust block device driver APIs.
I submitted the APIs along with a simple null block driver as an RFC last year
[1]. Since then I have kept the code in sync with latest mainline release [2],
cleaned up the code, and added a few features.
After talking to some of you at various meetups over the past year, I think we
have reached a point where we can potentially agree on merging initial Rust
block layer support, along with the null block driver. To that end, I plan to
send a few iterations of the patch set before LSF in May, so that we can use the
session to discuss any remaining details.
Since Kent has also proposed a dedicated Rust session, we might find some
synergy with this topic [3].
I also maintain an NVMe driver based on the Rust block APIs [4]. Due to
community feedback, I have no plans for upstreaming this driver at the moment.
However, it is a valuable tool for designing a sensible Rust block device API
that is suitable real hardware.
Part of the NVMe patches are abstractions for PCI. Other users (drm) have
expressed interest in these, so I plan to separate these in their own tree to
make them easier to pick up for those users.
As a last note, I have recently become aware of ongoing work on
implementing nbd in Rust. The work looks promising, and I hope the
author will decide to send the patches, when they are ready to be
shared.
Best regards
Andreas Hindborg
[1] https://lore.kernel.org/all/20230503090708.2524310-1-nmi@metaspace.dk/
[2] https://rust-for-linux.com/null-block-driver
[3] https://lore.kernel.org/all/wjtuw2m3ojn7m6gx2ozyqtvlsetzwxv5hdhg2hocal3gyou3ue@34e37oox4d5m/
[4] https://rust-for-linux.com/nvme-driver
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LSF/MM/BPF TOPIC] Rust block device driver APIs
2024-01-29 13:17 [LSF/MM/BPF TOPIC] Rust block device driver APIs Andreas Hindborg (Samsung)
@ 2024-01-29 15:40 ` Hannes Reinecke
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2024-01-29 15:40 UTC (permalink / raw)
To: Andreas Hindborg (Samsung), lsf-pc
Cc: linux-block, rust-for-linux, Jens Axboe, Keith Busch,
Matthew Wilcox, Damien Le Moal, Daniel Wagner, Christoph Hellwig,
Wedson Almeida Filho, Boqun Feng, Andreas Hindborg, gost.dev
On 1/29/24 14:17, Andreas Hindborg (Samsung) wrote:
> Hi All,
>
> I would like to propose a session on the Rust block device driver APIs.
>
> I submitted the APIs along with a simple null block driver as an RFC last year
> [1]. Since then I have kept the code in sync with latest mainline release [2],
> cleaned up the code, and added a few features.
>
> After talking to some of you at various meetups over the past year, I think we
> have reached a point where we can potentially agree on merging initial Rust
> block layer support, along with the null block driver. To that end, I plan to
> send a few iterations of the patch set before LSF in May, so that we can use the
> session to discuss any remaining details.
>
> Since Kent has also proposed a dedicated Rust session, we might find some
> synergy with this topic [3].
>
> I also maintain an NVMe driver based on the Rust block APIs [4]. Due to
> community feedback, I have no plans for upstreaming this driver at the moment.
> However, it is a valuable tool for designing a sensible Rust block device API
> that is suitable real hardware.
>
> Part of the NVMe patches are abstractions for PCI. Other users (drm) have
> expressed interest in these, so I plan to separate these in their own tree to
> make them easier to pick up for those users.
>
> As a last note, I have recently become aware of ongoing work on
> implementing nbd in Rust. The work looks promising, and I hope the
> author will decide to send the patches, when they are ready to be
> shared.
>
And I had an intern converting nbd to rust, which I could present as a
proof-of-concept.
Or, rather, as a showcase how a (pretty basic) Rust driver would look
like. Idea is to have a side-by-side comparison and figure out if
a) writing driver in Rust would simplify the code
b) existing/requiring functionality can be matched
or, in short, if Rust lives up to its promises.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald,
Werner Knoblich
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-29 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 13:17 [LSF/MM/BPF TOPIC] Rust block device driver APIs Andreas Hindborg (Samsung)
2024-01-29 15:40 ` Hannes Reinecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.