All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org
Subject: Re: Rust in QEMU roadmap
Date: Wed, 27 Nov 2024 12:38:51 +0000	[thread overview]
Message-ID: <Z0cS2y0Pk7eEdD1H@redhat.com> (raw)
In-Reply-To: <cc40943e-dec1-4890-a1d9-579350ce296f@pbonzini.local>

On Tue, Nov 26, 2024 at 06:46:45PM +0100, Paolo Bonzini wrote:
> Feature parity for pl011 device
> '''''''''''''''''''''''''''''''
> 
> Some recent pl011 commits are missing in the Rust version.  Philippe
> volunteered to port them to teach himself Rust.
> 
> Philippe also has a series to implement flow control and better use
> of the PL011 FIFO (IIUC).  Porting this to Rust would be hard right
> now, so its Rust implementation blocked on having chardev bindings.
> 
> Also missing is logging and tracing, but this part should not be a
> blocker for defaulting to --enable-rust.

I think it is OK to miss tracing as an exceptional one-off.

It is highly undesirable though for us to convert more than a
couple of devices (which currently use tracing) without having
tracing working. I consider tracing a critical feature for
supportability of QEMU.

IOW, I'm OK with lack of tracing not being a block for defaulting
to --enable-rust, provided it is accepted as being a high priority
item. Possibly call it a blocker for accepting conversions of
anything beyond pl011 & hpet, that currently has trace points.


> Tracing/logging
> '''''''''''''''
> 
> Tracepoints and logging are not supported yet, and no one has started working
> on it.
> 
> For tracing, it's not clear to me how much C code can be reused and how
> much Rust code can be automatically generated.  This would be a valid
> Outreachy or Summer of Code project, as it has a limited need for unsafe
> code and a well-defined scope.

As mentioned above, IMHO this needs to be treated as a high priority
item. While it would make a good Outreachy/GSoC project, I don't think
we should take that path, as it comes with no guarantee of a successful
timely delivery.

> A pure-Rust implementation would be interesting, but note that the usage
> of printf-style %-based field formatting is pervasive in the tracing
> subsystem.

Note that it is not unbounded printf style formatting. We are actually
pretty restricted in what we can use because our format strings are
required to be compatible with systemtap's formatter which is very
limited compared to C printf().

We've currently got an adhoc check to block use of '%m', but we could
easily make this a much stricter check on '%' and thus make it practical
to auto-convert our printf() style format strings to a format that rust
can use natively.

> Summary:
> 
> * Simple, low priority.

IMHO high priority. I don't want to enable Rust in Fedora/RHEL if
it going to degrade our ability to use tracing to debug production
deployments

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2024-11-27 12:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 17:46 Rust in QEMU roadmap Paolo Bonzini
2024-11-27  6:46 ` Zhao Liu
2024-11-27  8:21   ` Paolo Bonzini
2024-11-27 10:47 ` Stefan Hajnoczi
2024-11-27 12:18   ` Daniel P. Berrangé
2024-11-27 12:22     ` Paolo Bonzini
2024-12-05 12:00       ` Daniel P. Berrangé
2024-12-05 12:10         ` Paul Durrant
2024-11-27 12:38 ` Daniel P. Berrangé [this message]
     [not found] <ab7626bb-7c77-49c9-8dc8-86d79b095e3a@pbonzini.local>
2024-12-01 12:16 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z0cS2y0Pk7eEdD1H@redhat.com \
    --to=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.