Re: [osv-dev] Re: [PATCH 3/3] scripts: add virtio-fs DAX option to run.py

2021-04-02 Thread Fotis Xenakis
Hello Matias,

Thank you for chiming in,
libkrun indeed seems very promising and, very importantly, pretty valuable 
from an end-user perspective if it becomes practical!
To my eyes, virtio-fs makes most sense in such setups: it's kind of the 
equivalent of bind mounts in Docker terminology.

On a side note, it's started by some very prominent people in the 
lightweight virtualization community.

P.S. It's great to have such, more general, discussions or even sharing 
resources and perspectives. I wouldn't want to hijack this thread,
but feel free to start a fresh one if you 'd like to continue this 
discussion.

On Wednesday, March 31, 2021 at 9:39:29 PM UTC+3 matia...@gmail.com wrote:

> Hello, 
>
> I think it may be interesting to have a look at libkrun (
> https://github.com/containers/libkrun). As far I know, it supports 
> virtio-fs.
>
> Matias
>
> On Wed, 31 Mar 2021 at 16:55, Fotis Xenakis  wrote:
>
>> On Tuesday, March 30, 2021 at 9:23:24 PM UTC+3 jwkoz...@gmail.com wrote:
>>
>>> Fotis,
>>>
>>> Thanks a lot! 
>>>
>>> I have updated this page to include the information about ARM - 
>>> virtio-fs works on this arch as well which is great!
>>>
>> It is awesome to hear that! What would be mildly surprising is if DAX 
>> also worked on ARM (on the host/QEMU side as well, given it's not yet fully 
>> stable).
>>
>>>
>>> The virtio-fs support is probably the single most exciting new feature 
>>> added to OSv in the last couple of years! I am not aware of any other 
>>> unikernel supporting it. 
>>>
>> It sure has a great value to dev effort ratio! The only other unikernel 
>> supporting it is toro AFAIK: https://github.com/torokernel/torokernel
>>
>>>
>>> Thanks a lot,
>>> Waldek
>>>
>>> PS. It would be nice if some other hypervisors (thinking of firecracker) 
>>> supported virtio-fs as well.
>>>
>> Indeed, it seems a great fit for the lightweight VMMs. Firecracker was 
>> close to adding it, but eventually did not: 
>> https://github.com/firecracker-microvm/firecracker/pull/1351
>> Yet, cloud-hypervisor does support it, notably with the contributions of 
>> upstream virtio-fs devs: 
>> https://github.com/cloud-hypervisor/cloud-hypervisor/blob/v0.14.0/docs/fs.md
>>
>>>
>>> On Friday, March 26, 2021 at 1:44:30 PM UTC-4 Fotis Xenakis wrote:
>>>
 Update: the wiki page is here: 
 https://github.com/cloudius-systems/osv/wiki/virtio-fs
 All questions/feedback and of course contributions welcome!

 On Saturday, March 13, 2021 at 9:04:03 PM UTC+2 Fotis Xenakis wrote:

> You are absolutely right, some proper guide and documentation is 
> necessary, thank you for the suggestion!
> I shall take care of it upon first chance.
>
> On Saturday, March 13, 2021 at 6:29:28 PM UTC+2 jwkoz...@gmail.com 
> wrote:
>
>> Hey,
>>
>> I have applied 3 of your patches. 
>>
>> As I was doing and testing it I realized we do not have any Wiki page 
>> that describes how to use virtio-fs with OSv. Would you have a bit of 
>> time 
>> to add a page that does so - a simple step-by-step cookbook - how to 
>> build 
>> with export and fs options, and then run with various new options (DAX, 
>> no 
>> dax, etc), need to use sudo, which version of QEMU, etc - 
>> https://github.com/cloudius-systems/osv/wiki?  Maybe also link to 
>> your QEMU article?
>>
>> Right now we have some info scattered acros some commit messages but 
>> nothing in one place. 
>>
>> I would really appreciate it,
>> Waldek
>>
>> On Saturday, March 6, 2021 at 4:34:31 PM UTC-5 Fotis Xenakis wrote:
>>
>>> Signed-off-by: Fotis Xenakis  
>>> --- 
>>> scripts/run.py | 5 - 
>>> 1 file changed, 4 insertions(+), 1 deletion(-) 
>>>
>>> diff --git a/scripts/run.py b/scripts/run.py 
>>> index 71c6cdd7..6a81e98b 100755 
>>> --- a/scripts/run.py 
>>> +++ b/scripts/run.py 
>>> @@ -178,9 +178,10 @@ def start_osv_qemu(options): 
>>> "-drive", "file=%s,if=none,id=hd1" % (options.cloud_init_image)] 
>>>
>>> if options.virtio_fs_tag: 
>>> + dax = (",cache-size=%s" % options.virtio_fs_dax) if 
>>> options.virtio_fs_dax else "" 
>>> args += [ 
>>> "-chardev", "socket,id=char0,path=/tmp/vhostqemu", 
>>> - "-device", 
>>> "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s" % 
>>> options.virtio_fs_tag, 
>>> + "-device", 
>>> "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s%s" % 
>>> (options.virtio_fs_tag, dax), 
>>> "-object", 
>>> "memory-backend-file,id=mem,size=%s,mem-path=/dev/shm,share=on" % 
>>> options.memsize, 
>>> "-numa", "node,memdev=mem"] 
>>>
>>> @@ -602,6 +603,8 @@ if __name__ == "__main__": 
>>> help="virtio-fs device tag") 
>>> parser.add_argument("--virtio-fs-dir", action="store", 
>>> help="path to the directory exposed via virtio-fs mount") 
>>> + parser.add_argument("--virtio-fs-dax", 

Re: [osv-dev] Re: [PATCH 3/3] scripts: add virtio-fs DAX option to run.py

2021-03-31 Thread Matias Vara
Hello,

I think it may be interesting to have a look at libkrun (
https://github.com/containers/libkrun). As far I know, it supports
virtio-fs.

Matias

On Wed, 31 Mar 2021 at 16:55, Fotis Xenakis  wrote:

> On Tuesday, March 30, 2021 at 9:23:24 PM UTC+3 jwkoz...@gmail.com wrote:
>
>> Fotis,
>>
>> Thanks a lot!
>>
>> I have updated this page to include the information about ARM - virtio-fs
>> works on this arch as well which is great!
>>
> It is awesome to hear that! What would be mildly surprising is if DAX also
> worked on ARM (on the host/QEMU side as well, given it's not yet fully
> stable).
>
>>
>> The virtio-fs support is probably the single most exciting new feature
>> added to OSv in the last couple of years! I am not aware of any other
>> unikernel supporting it.
>>
> It sure has a great value to dev effort ratio! The only other unikernel
> supporting it is toro AFAIK: https://github.com/torokernel/torokernel
>
>>
>> Thanks a lot,
>> Waldek
>>
>> PS. It would be nice if some other hypervisors (thinking of firecracker)
>> supported virtio-fs as well.
>>
> Indeed, it seems a great fit for the lightweight VMMs. Firecracker was
> close to adding it, but eventually did not:
> https://github.com/firecracker-microvm/firecracker/pull/1351
> Yet, cloud-hypervisor does support it, notably with the contributions of
> upstream virtio-fs devs:
> https://github.com/cloud-hypervisor/cloud-hypervisor/blob/v0.14.0/docs/fs.md
>
>>
>> On Friday, March 26, 2021 at 1:44:30 PM UTC-4 Fotis Xenakis wrote:
>>
>>> Update: the wiki page is here:
>>> https://github.com/cloudius-systems/osv/wiki/virtio-fs
>>> All questions/feedback and of course contributions welcome!
>>>
>>> On Saturday, March 13, 2021 at 9:04:03 PM UTC+2 Fotis Xenakis wrote:
>>>
 You are absolutely right, some proper guide and documentation is
 necessary, thank you for the suggestion!
 I shall take care of it upon first chance.

 On Saturday, March 13, 2021 at 6:29:28 PM UTC+2 jwkoz...@gmail.com
 wrote:

> Hey,
>
> I have applied 3 of your patches.
>
> As I was doing and testing it I realized we do not have any Wiki page
> that describes how to use virtio-fs with OSv. Would you have a bit of time
> to add a page that does so - a simple step-by-step cookbook - how to build
> with export and fs options, and then run with various new options (DAX, no
> dax, etc), need to use sudo, which version of QEMU, etc -
> https://github.com/cloudius-systems/osv/wiki?  Maybe also link to
> your QEMU article?
>
> Right now we have some info scattered acros some commit messages but
> nothing in one place.
>
> I would really appreciate it,
> Waldek
>
> On Saturday, March 6, 2021 at 4:34:31 PM UTC-5 Fotis Xenakis wrote:
>
>> Signed-off-by: Fotis Xenakis 
>> ---
>> scripts/run.py | 5 -
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/run.py b/scripts/run.py
>> index 71c6cdd7..6a81e98b 100755
>> --- a/scripts/run.py
>> +++ b/scripts/run.py
>> @@ -178,9 +178,10 @@ def start_osv_qemu(options):
>> "-drive", "file=%s,if=none,id=hd1" % (options.cloud_init_image)]
>>
>> if options.virtio_fs_tag:
>> + dax = (",cache-size=%s" % options.virtio_fs_dax) if
>> options.virtio_fs_dax else ""
>> args += [
>> "-chardev", "socket,id=char0,path=/tmp/vhostqemu",
>> - "-device", "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s"
>> % options.virtio_fs_tag,
>> + "-device",
>> "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s%s" %
>> (options.virtio_fs_tag, dax),
>> "-object",
>> "memory-backend-file,id=mem,size=%s,mem-path=/dev/shm,share=on" %
>> options.memsize,
>> "-numa", "node,memdev=mem"]
>>
>> @@ -602,6 +603,8 @@ if __name__ == "__main__":
>> help="virtio-fs device tag")
>> parser.add_argument("--virtio-fs-dir", action="store",
>> help="path to the directory exposed via virtio-fs mount")
>> + parser.add_argument("--virtio-fs-dax", action="store",
>> + help="DAX window size for virtio-fs device (disabled if not
>> specified)")
>> parser.add_argument("--mount-fs", default=[], action="append",
>> help="extra mounts (forwarded to respective kernel command line
>> option)")
>> parser.add_argument("--ip", default=[], action="append",
>> --
>> 2.30.1
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "OSv Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osv-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osv-dev/538fe958-fb89-4286-8cb5-a0dc4664ae72n%40googlegroups.com
> 
> .
>

-- 
You received this