Raise 9pfs mount_tag limit from 32 to 255 bytes
PATCH 1/1 Raise 9pfs mount_tag limit from 32 to 255 bytes
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a mount_tag larger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?
Tested with a 3.0.4 kernel and a mount_tag 255 bytes in length.
* hw/9pfs/virtio-9p.h: Change MAX_TAG_LEN to 255
--- hw/9pfs/virtio-9p.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/9pfs/virtio-9p.h +1 -1
@@ -144,7 +144,7 @@ struct V9fsPDU/* The ID for virtio console */ #define VIRTIO_ID_9P 9#define MAX_REQ 128 -#define MAX_TAG_LEN 32 +#define MAX_TAG_LEN 255#define BUG_ON (cond) assert(!(cond))
Signature · 1 line
1.7.6.2
Quoted 9 lines · Daniel P. Berrange
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tag is passed via pci config space, do we want to have 255 bytes out of that for device identification. Is this change driven by
the virt-manager UI where we specify source and target directory for file system ?. I would like to understand how that target
directory is used in case of other user like NFS ?. If this is something used to get automout (I am not sure how we drive such an automount) of those mounts points, then it should be ok for VirtFS to generate mount tag internally which will fit 32 byte limit and use the target directory for automounting the mount point using the internally generated mount tag
Quoted 11 lines
Signed-off-by Daniel P. Berrange <[email protected]>--- hw/9pfs/virtio-9p.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)hw/9pfs/virtio-9p.h +0
-0
hw/9pfs/virtio-9p.h struct V9fsPDU · line 150
Quoted 8 lines
hw/9pfs/virtio-9p.h +1
-1@@ -144,7 +144,7 @@ struct V9fsPDU/* The ID for virtio console */ #define VIRTIO_ID_9P 9#define MAX_REQ 128 -#define MAX_TAG_LEN 32 +#define MAX_TAG_LEN 255#define BUG_ON (cond) assert(!(cond))
-aneesh
Quoted 7 lines · Aneesh Kumar K.V
Quoted 6 lines · Daniel P. Berrange
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?
Quoted 7 lines
Quoted 3 lines
Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tagis passed via pci config space, do we want to have 255 bytes out of that for device identification.
How big is the config space available for each 9pfs device and what other info does it need to keep there ?
Quoted 8 lines
Is this change driven by
the virt-manager UI where we specify source and target directory for file system ?. I would like to understand how that target
directory is used in case of other user like NFS ?. If this is something used to get automout (I am not sure how we drive such an automount) of those mounts points, then it should be ok for VirtFS to generate mount tag internally which will fit 32 byte limit and use the target directory for automounting the mount point using the internally generated mount tag
There's no virt-manager involved in what I'm working on. It is a tiny app with KVM embedded behind the scenes. All that runs inside the virtual machine is a minature 'init' process which mounts any 9pfs filesystems it finds, creates some device nodes, and then runs the application bianry. The 'init' code does not have any knowledge of where the 9pfs filesystems need to be mounted, that info must come from the host, because it can vary on each boot.
I don't want to have to pass separate 'mount_tag'; -> 'mount point' mapping data through to the guest via a side-channel. I just want to put the target mount point path, directly in the mount tag.
Originally I was trying to namespace my mount tags
org.virttools.dir:/mount/point/path
but this hit the 32 byte limit almost immediately, so now I just put the raw '/mount/point/path' in each mount tag.
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Quoted 10 lines · Daniel P. Berrange
Quoted 9 lines · Aneesh Kumar K.V
Quoted 8 lines · Daniel P. Berrange
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tagis passed via pci config space, do we want to have 255 bytes out of that for device identification.How big is the config space available for each 9pfs device and what other info does it need to keep there ?
Does anyone have an clear answer for this ?
I've done some tests with ever larger mount tags, and managed to increase the MAX_TAG_LEN value to 1023 before I started getting guest failures.
So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the mount_tag, or at the very least increase it from 32 to 128 ?
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Quoted 20 lines · Daniel P. Berrange
Quoted 10 lines · Daniel P. Berrange
Quoted 9 lines · Aneesh Kumar K.V
Quoted 8 lines · Daniel P. Berrange
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tagis passed via pci config space, do we want to have 255 bytes out of that for device identification.How big is the config space available for each 9pfs device and what other info does it need to keep there ?
Quoted 9 lines
Does anyone have an clear answer for this ?
I've done some tests with ever larger mount tags, and managed to increase the
MAX_TAG_LENvalue to 1023 before I started getting guest failures.So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the
mount_tag, or at the very least increase it from 32 to 128 ?
Last time we discussed this Anthony wanted to keep the config space usage minimal, hence we agreed on the size 32 bytes.
Anthony,
Any comments ?
-aneesh
Quoted 26 lines · Aneesh Kumar K.V
Quoted 25 lines · Daniel P. Berrange
Quoted 10 lines · Daniel P. Berrange
Quoted 9 lines · Aneesh Kumar K.V
Quoted 8 lines · Daniel P. Berrange
From: "Daniel P. Berrange" <[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tagis passed via pci config space, do we want to have 255 bytes out of that for device identification.How big is the config space available for each 9pfs device and what other info does it need to keep there ?
Does anyone have an clear answer for this ?
I've done some tests with ever larger mount tags, and managed to increase the
MAX_TAG_LENvalue to 1023 before I started getting guest failures.
Quoted 7 lines
Quoted 4 lines
So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the
mount_tag, or at the very least increase it from 32 to 128 ?Last time we discussed this Anthony wanted to keep the config space usage minimal, hence we agreed on the size 32 bytes.
Ping ? Anyone ....
Does anyone have any clear information about the per-device config space we have available ? As above I'd really like us to raise the mount_tag length even just a little bit higher for QEMU 1.0, if we have the PCI config space available to play with.
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Quoted 35 lines · Daniel P. Berrange
Quoted 26 lines · Aneesh Kumar K.V
Quoted 25 lines · Daniel P. Berrange
Quoted 10 lines · Daniel P. Berrange
Quoted 9 lines · Aneesh Kumar K.V
Quoted 8 lines · Daniel P. Berrange
From: "Daniel P. Berrange"<[email protected]>
The Linux guest kernel does not appear to have a problem handling a
mount_taglarger than 32 bytes. Increase the limit to 255 bytes, though perhaps it can be made larger still, or not limited at all ?Tested with a 3.0.4 kernel and a
mount_tag255 bytes in length.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
*
hw/9pfs/virtio-9p.h: ChangeMAX_TAG_LENto 255
mount_tagis passed via pci config space, do we want to have 255 bytes out of that for device identification.How big is the config space available for each 9pfs device and what other info does it need to keep there ?
Does anyone have an clear answer for this ?
I've done some tests with ever larger mount tags, and managed to increase the
MAX_TAG_LENvalue to 1023 before I started getting guest failures.Quoted 7 lines
Quoted 4 lines
So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the
mount_tag, or at the very least increase it from 32 to 128 ?Last time we discussed this Anthony wanted to keep the config space usage minimal, hence we agreed on the size 32 bytes.
Quoted 6 lines
Ping ? Anyone ....
Does anyone have any clear information about the per-device config space we have available ? As above I'd really like us to raise the
mount_taglength even just a little bit higher for QEMU 1.0, if we have the PCI config space available to play with.
Yes, PCI PIO space is very small. I think 128 is even pushing it.
Why not add a feature that exchanges the tag through another mechanism such that there doesn't need to be a limit? It could be as simple as adding an fsstat .L operation or something like that.
Regards,
Anthony Liguori
Quoted 3 lines
Regards,
Daniel
Quoted 15 lines · Anthony Liguori
Quoted 14 lines · Daniel P. Berrange
Quoted 12 lines · Aneesh Kumar K.V
Quoted 8 lines · Daniel P. Berrange
On Thu, Sep 29, 2011 at 04:22:16PM +0100, Daniel P. Berrange wrote:
I've done some tests with ever larger mount tags, and managed to increase theMAX_TAG_LENvalue to 1023 before I started getting guest failures.So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the
mount_tag, or at the very least increase it from 32 to 128 ?Last time we discussed this Anthony wanted to keep the config space usage minimal, hence we agreed on the size 32 bytes.
Quoted 8 lines
Quoted 6 lines
Ping ? Anyone ....
Does anyone have any clear information about the per-device config space we have available ? As above I'd really like us to raise the
mount_taglength even just a little bit higher for QEMU 1.0, if we have the PCI config space available to play with.Yes, PCI PIO space is very small. I think 128 is even pushing it.
Odd, because I managed to pass through a 1023 byte path without appearing to have any trouble. Is the space per-device, or global to all devices. If the latter, I could understand the desire to keep it smaller.
Quoted 3 lines
Why not add a feature that exchanges the tag through another mechanism such that there doesn't need to be a limit? It could be as simple as adding an fsstat .L operation or something like that.
That would require kernel side updates too I presume, so if that kind of change is the only option, I think I'll just have to change my app's code to cope with the current smaller limits for now.
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Quoted 23 lines · Daniel P. Berrange
Quoted 22 lines · Anthony Liguori
Quoted 20 lines · Daniel P. Berrange
Quoted 5 lines · Aneesh Kumar K.V
Quoted 4 lines · Daniel P. Berrange
On Thu, Sep 29, 2011 at 04:22:16PM +0100, Daniel P. Berrange wrote:
I've done some tests with ever larger mount tags, and managed to increase theMAX_TAG_LENvalue to 1023 before I started getting guest failures.Quoted 7 lines
Quoted 4 lines
So if the config space is really 1023 bytes in size, it doesn't seem too unrealistic to allow 255 bytes of it for the
mount_tag, or at the very least increase it from 32 to 128 ?Last time we discussed this Anthony wanted to keep the config space usage minimal, hence we agreed on the size 32 bytes.
Ping ? Anyone ....
Does anyone have any clear information about the per-device config space we have available ? As above I'd really like us to raise the
mount_taglength even just a little bit higher for QEMU 1.0, if we have the PCI config space available to play with.
Quoted 6 lines
Quoted 1 line
Yes, PCI PIO space is very small. I think 128 is even pushing it.
Odd, because I managed to pass through a 1023 byte path without appearing to have any trouble. Is the space per-device, or global to all devices. If the latter, I could understand the desire to keep it smaller.
It's global so it ends up being a problem when you have many devices.
Quoted 8 lines
Quoted 4 lines
Why not add a feature that exchanges the tag through another mechanism such that there doesn't need to be a limit? It could be as simple as adding an fsstat .L operation or something like that.
That would require kernel side updates too I presume, so if that kind of change is the only option, I think I'll just have to change my app's code to cope with the current smaller limits for now.
Right.
Regards,
Anthony Liguori
Quoted 3 lines
Regards,
Daniel