From: Stefan Hajnoczi <stefanha@redhat.com>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Peter-Jan Gootzen <pgootzen@nvidia.com>,
Idan Zach <izach@nvidia.com>, Yoray Zack <yorayz@nvidia.com>,
"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
Parav Pandit <parav@nvidia.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"bin.yang@jaguarmicro.com" <bin.yang@jaguarmicro.com>,
Max Gurtovoy <mgurtovoy@nvidia.com>,
Eliav Bar-Ilan <eliavb@nvidia.com>,
"mst@redhat.com" <mst@redhat.com>,
"lege.wang@jaguarmicro.com" <lege.wang@jaguarmicro.com>,
Oren Duer <oren@nvidia.com>,
"angus.chen@jaguarmicro.com" <angus.chen@jaguarmicro.com>
Subject: Re: Addressing architectural differences between FUSE driver and fs - Re: virtio-fs tests between host(x86) and dpu(arm64)
Date: Mon, 3 Jun 2024 11:28:01 -0400 [thread overview]
Message-ID: <20240603152801.GA1688749@fedora.redhat.com> (raw)
In-Reply-To: <CAOssrKfw4MKbGu=dXAdT=R3_2RX6uGUUVS+NEZp0fcfiNwyDWw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2806 bytes --]
On Mon, Jun 03, 2024 at 04:56:14PM +0200, Miklos Szeredi wrote:
> On Mon, Jun 3, 2024 at 3:44 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > On Mon, Jun 03, 2024 at 11:06:19AM +0200, Miklos Szeredi wrote:
> > > On Mon, 3 Jun 2024 at 10:53, Peter-Jan Gootzen <pgootzen@nvidia.com> wrote:
> > >
> > > > We also considered this idea, it would kind of be like locking FUSE into
> > > > being x86. However I think this is not backwards compatible. Currently
> > > > an ARM64 client and ARM64 server work just fine. But making such a
> > > > change would break if the client has the new driver version and the
> > > > server is not updated to know that it should interpret x86 specifically.
> > >
> > > This would need to be negotiated, of course.
> > >
> > > But it's certainly simpler to just indicate the client arch in the
> > > INIT request. Let's go with that for now.
> >
> > In the long term it would be cleanest to choose a single canonical
> > format instead of requiring drivers and devices to implement many
> > arch-specific formats. I liked the single canonical format idea you
> > suggested.
> >
> > My only concern is whether there are more commands/fields in FUSE that
> > operate in an arch-specific way (e.g. ioctl)? If there really are parts
> > that need to be arch-specific, then it might be necessary to negotiate
> > an architecture after all.
>
> How about something like this:
>
> - by default fall back to no translation for backward compatibility
> - server may request matching by sending its own arch identifier in
> fuse_init_in
> - client sends back its arch identifier in fuse_init_out
> - client also sends back a flag indicating whether it will transform
> to canonical or not
>
> This means the client does not have to implement translation for every
> architecture, only ones which are frequently used as guest. The
> server may opt to implement its own translation if it's lacking in the
> client, or it can just fail.
From the client perspective:
1. Do not negotiate arch in fuse_init_out - hopefully client and server
know what they are doing :). This is the current behavior.
2. Reply to fuse_init_in with server's arch in fuse_init_out - client
translates according to server's arch.
3. Reply to fuse_init_in with canonical flag set in fuse_init_out -
client and server use canonical format.
From the server perspective:
1. Client does not negotiate arch - the current behavior (good luck!).
2. Arch received in fuse_init_out from client - must be equal to
server's arch since there is no way for the server to reject the
arch.
3. Canonical flag received in fuse_init_out from client - client and
server use canonical format.
Is this what you had in mind?
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-06-03 15:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 9:31 virtio-fs tests between host(x86) and dpu(arm64) Lege Wang
2024-06-03 8:01 ` Addressing architectural differences between FUSE driver and fs - " Peter-Jan Gootzen
2024-06-03 8:24 ` Miklos Szeredi
2024-06-03 8:52 ` Peter-Jan Gootzen
2024-06-03 9:06 ` Miklos Szeredi
2024-06-03 13:44 ` Stefan Hajnoczi
2024-06-03 14:56 ` Miklos Szeredi
2024-06-03 15:28 ` Stefan Hajnoczi [this message]
2024-06-04 8:02 ` Miklos Szeredi
2024-06-04 8:28 ` Peter-Jan Gootzen
2024-06-04 8:45 ` Miklos Szeredi
2024-06-04 9:08 ` Peter-Jan Gootzen
2024-06-04 9:18 ` Miklos Szeredi
2024-06-04 9:31 ` Peter-Jan Gootzen
2024-06-04 10:21 ` Miklos Szeredi
2024-06-04 3:08 ` Lege Wang
2024-06-04 7:13 ` Idan Zach
2024-06-04 18:09 ` Daniel Verkamp
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=20240603152801.GA1688749@fedora.redhat.com \
--to=stefanha@redhat.com \
--cc=angus.chen@jaguarmicro.com \
--cc=bin.yang@jaguarmicro.com \
--cc=eliavb@nvidia.com \
--cc=izach@nvidia.com \
--cc=lege.wang@jaguarmicro.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mgurtovoy@nvidia.com \
--cc=miklos@szeredi.hu \
--cc=mst@redhat.com \
--cc=mszeredi@redhat.com \
--cc=oren@nvidia.com \
--cc=parav@nvidia.com \
--cc=pgootzen@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=yorayz@nvidia.com \
/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.