SlideShare a Scribd company logo
Plan 9
           / paravirt.org
/ @go_vm



2010   2    23     @IIJ
  Kernel/VM
                            1
•        / @go_vm

•
•
    •   KVM



                    2
•   twitter




              3
?
Plan 9   ?
             4
5
Plan 9
•                     Plan9



•   30


•                ”        ”


•   http://circle.paravirt.org/c77




                                       6
Plan 9       (2)

•               ...

• KVM       VM



•       Plan9



                            7
•   09 12   30


•

•   3            50



•

                      8
•   2 10   OST




•



                 9
10
11
•             VMM

                           OS            OS
    •   KVM VirtualBox
                         VMM         VMM

    •   VMM         OS            OS



                           Type II VMM




                                              12
VM            CPU
•                   OS
        CPU



    •
    •

                         13
OS

TEXT    main+0(SB),0,$0
MOVL    $1,4(SP)
MOVL    $.string+0(SB),8(SP)
MOVL    $14,12(SP)
MOVL    $20,AX
INT     $64
MOVL    $0,4(SP)
MOVL    $8,AX
INT     $64
GLOBL   .string+0(SB),$16
DATA    .string+0(SB)/8,$”Hello, w”
DATA    .string+0(SB)/8,$”orld!¥z¥z¥n”
END     ,




                                         14
• CPU

 •          :

 •                  :
        ”       ”


                        15
16
x86




      17
x86




      18
•     (VMware)

•     (LilyVM)

•   (Xen)




                 19
•
•


    20
Intel          AMD
• CPU

    • Intel → Intel VT (vmx)
    • AMD → AMD-V (svm)
•        vmx                         svm



                                           21
vmx
      VMX-root mode     VMX-non root mode
            VMEntry



(                       (
                 )                          )
                        VMExit
    VMX-non root mode

                                            22
non-root
•


     mode
                 OS            OS

               VMM         VMM
•
    mode
    root                OS



                 Type II VMM




                                    23
root     non-root
     mode      mode




      VMM
                 OS




     kernel    user
     mode      mode




24
•
                                •



     kernel              user
     mode                mode
              sysenter




25
•




    26
•          VMM




                 non-root
                  mode
                              OS


                                  vmcall
•   VMM(   )


                 mode
                 root
                            VMM




                                           27
<   Plan9>



             28
Plan9
•        Plan9       KVM
                             Plan9



• socket,connect,send,recv
         Plan9



                                     29
(1)
TEXT vmcall(SB), $0
  MOVL b+0(FP),BX
                      •   Plan9

  MOVL c+4(FP),CX     •           BYTE
  MOVL d+8(FP),DX           vmx vmcall
  MOVL $12345, AX
  BYTE $0xf
  BYTE $0x1
                      •
  BYTE $0xc1
  RET



                                         30
(2)
                                            •   hsocket
int hsocket(int dom,int type,int proto)
{
  struct {int d;int t;int p;} arg;
  arg.d = dom;
  arg.t = type;
                                            •              socket
  arg.p = proto;                                      FD
  return vmcall(0,(int)&arg,sizeof(arg));
}

                                            •   KVM




                                                                    31
(3)
int hsend(int fd,void *buf,int len,int flg)
{                                             •   hsend
  struct {int fd;void *b;int l;int f;} arg;
  arg.fd = fd;
  arg.b = buf;
  arg.l = len;
  arg.f = flg;
                                              •           socket
  return vmcall(2,(int)&arg,sizeof(arg));         send
}

                                              •


                                                                   32
VMM
                                                •   hsend VMM
int hcall_socket(void *opaque,gva_t arg,int len)
{
  struct {int dom;int type;int proto;} harg;    •
    if(sizeof(harg) != len) return -EINVAL;
    if(copy_from_guest(opaque,&harg,arg,len))
        return -EFAULT;

    return socket(harg.dom,
                  harg.type,
                  harg.proto);
                                                •
}                                                       socket()




                                                                   33
34
</   Plan9>



              35
36
Plan9

•
•         adhoc

• Plan9


                     37
•   Plan9       Plan9
        Plan9




                        38
• KVM
 • VMRPC
 • Socket Outsourcing


                        39
VMRPC
•                   RPC



    •   →    RPC

    •
    •
    •
                          40
VMRPC



OS      OS




             41
                  41
Socket Outsourcing
•   VMRPC        Socket Hypercall Interface

•       OS         Socket API
             (BSD Socket        )

•                           Linux,Windows



    •

                                              42
•   OS

TCP/IP

                    OS
                         •
         NIC   VMM

                         •

                    OS
                         ‣
               43
                                  43
•
TCP/IP

                    OS
                         •   OS
         NIC   VMM

                         •

                    OS
                         ‣
               44
                                  44
•
TCP/IP                       OS

                    OS
                         •        OS
         NIC   VMM



TCP/IP

                    OS
                         ‣
               45
                                       45
Socket Outsourcing

• VMM

• VMRPC

•

                     46
• NIC              virtio Socket
 Outsourcing   iperf




                                   47
•
    • CPU: Intel Core i7 950 3.06GHz
    • NIC: Intel 82598EB (10G)
• VMM: KVM88 (VMRPC )
•       OS: Linux 2.6.25(SocketOutsourcing


                                             48
10000


          7500
[Mbps]




          5000


          2500


             0
                 e1000(emu)   virtio   Sos



                                             49
50
Plan9

•
    • dial       API

    • /net/tcp


                       51
API

   • Plan9                                   API           Sos Socket



       • API
       •                   Windows                                      *
*Improving Virtualized Network Performance by Delegating Network Processing
 Younggyun Koh,Calton Pu,Yasushi Shinjo,Hideki Eiraku,Go Saito,Daiyuu Nobori
                                IEEE NCA09


                                                                               52
/net/tcp
 •   Plan9       /net/tcp
           tcp

 •   SocketOutsourcing



 •   API

 •   Plan9




                            53
•
•   Plan9




            54
• KVM
    Plan9

•           Plan9




                    55
Demo
       56
•   Plan9     Hypercall



•       Hypercall




•     Plan9

                          57
http://circle.paravirt.org/c77




                                 58

More Related Content

What's hot

Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by OpenstackMarton Kiss
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxJazz Yao-Tsung Wang
 
Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming. Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming. Atul Jha
 
Rootconf2009 Chubin Xgurulla
Rootconf2009 Chubin XgurullaRootconf2009 Chubin Xgurulla
Rootconf2009 Chubin XgurullaLiudmila Li
 
Linux kernel bug hunting
Linux kernel bug huntingLinux kernel bug hunting
Linux kernel bug huntingAndrea Righi
 
Rasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border routerRasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border routerNikolaos Monios
 
libuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/olibuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/oSaúl Ibarra Corretgé
 
How to manage stateful applications in Kubernetes
How to manage stateful applications in KubernetesHow to manage stateful applications in Kubernetes
How to manage stateful applications in KubernetesFlorian Woerner
 
証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議Hiroki Mizuno
 

What's hot (20)

Flex pod driven by Openstack
Flex pod driven by OpenstackFlex pod driven by Openstack
Flex pod driven by Openstack
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in Linux
 
Openbsd days
Openbsd daysOpenbsd days
Openbsd days
 
Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming. Minio: Associated projects in Go programming.
Minio: Associated projects in Go programming.
 
Rootconf2009 Chubin Xgurulla
Rootconf2009 Chubin XgurullaRootconf2009 Chubin Xgurulla
Rootconf2009 Chubin Xgurulla
 
Linux kernel bug hunting
Linux kernel bug huntingLinux kernel bug hunting
Linux kernel bug hunting
 
Workshop@naha_val3
Workshop@naha_val3Workshop@naha_val3
Workshop@naha_val3
 
Rasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border routerRasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border router
 
Qemu
QemuQemu
Qemu
 
libuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/olibuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/o
 
How to manage stateful applications in Kubernetes
How to manage stateful applications in KubernetesHow to manage stateful applications in Kubernetes
How to manage stateful applications in Kubernetes
 
A deep dive into libuv
A deep dive into libuvA deep dive into libuv
A deep dive into libuv
 
Linux encrypted container
Linux encrypted containerLinux encrypted container
Linux encrypted container
 
One plus 5t architecture
One plus 5t architectureOne plus 5t architecture
One plus 5t architecture
 
証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議
 
ns2 install
ns2 installns2 install
ns2 install
 
testing-nfs
testing-nfstesting-nfs
testing-nfs
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
 
My First BCC
My First BCCMy First BCC
My First BCC
 

Similar to 軽快なPlan9 (第三回Kernel/VM探検隊)

AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorAsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorDave Voutila
 
AVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpegAVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpegKieran Kunhya
 
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...Paris Open Source Summit
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack eurobsdcon
 
Hardware support for efficient virtualization
Hardware support for efficient virtualizationHardware support for efficient virtualization
Hardware support for efficient virtualizationLennox Wu
 
Java Jit. Compilation and optimization by Andrey Kovalenko
Java Jit. Compilation and optimization by Andrey KovalenkoJava Jit. Compilation and optimization by Andrey Kovalenko
Java Jit. Compilation and optimization by Andrey KovalenkoValeriia Maliarenko
 
OSインストーラーの自作方法
OSインストーラーの自作方法OSインストーラーの自作方法
OSインストーラーの自作方法LINE Corporation
 
QEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentQEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentGlobalLogic Ukraine
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...CODE BLUE
 
Clr jvm implementation differences
Clr jvm implementation differencesClr jvm implementation differences
Clr jvm implementation differencesJean-Philippe BEMPEL
 
Дмитрий Вовк: Векторизация кода под мобильные платформы
Дмитрий Вовк: Векторизация кода под мобильные платформыДмитрий Вовк: Векторизация кода под мобильные платформы
Дмитрий Вовк: Векторизация кода под мобильные платформыDevGAMM Conference
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to knowRoberto Agostino Vitillo
 
Introduction to PICAXE Microcontrollers
Introduction to PICAXE MicrocontrollersIntroduction to PICAXE Microcontrollers
Introduction to PICAXE MicrocontrollersL. Paul Verhage
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたTaro Matsuzawa
 
[ENG] IPv6 shipworm + My little Windows domain pwnie
[ENG] IPv6 shipworm + My little Windows domain pwnie[ENG] IPv6 shipworm + My little Windows domain pwnie
[ENG] IPv6 shipworm + My little Windows domain pwnieZoltan Balazs
 
Building a robot with the .Net Micro Framework
Building a robot with the .Net Micro FrameworkBuilding a robot with the .Net Micro Framework
Building a robot with the .Net Micro FrameworkDucas Francis
 

Similar to 軽快なPlan9 (第三回Kernel/VM探検隊) (20)

AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorAsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
 
AVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpegAVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpeg
 
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...
#OSSPARIS19 : A virtual machine approach for microcontroller programming : th...
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Hardware support for efficient virtualization
Hardware support for efficient virtualizationHardware support for efficient virtualization
Hardware support for efficient virtualization
 
Java Jit. Compilation and optimization by Andrey Kovalenko
Java Jit. Compilation and optimization by Andrey KovalenkoJava Jit. Compilation and optimization by Andrey Kovalenko
Java Jit. Compilation and optimization by Andrey Kovalenko
 
OSインストーラーの自作方法
OSインストーラーの自作方法OSインストーラーの自作方法
OSインストーラーの自作方法
 
QEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentQEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded Development
 
Deep hooks
Deep hooksDeep hooks
Deep hooks
 
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
[cb22] Under the hood of Wslink’s multilayered virtual machine en by Vladisla...
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 
Clr jvm implementation differences
Clr jvm implementation differencesClr jvm implementation differences
Clr jvm implementation differences
 
Дмитрий Вовк: Векторизация кода под мобильные платформы
Дмитрий Вовк: Векторизация кода под мобильные платформыДмитрий Вовк: Векторизация кода под мобильные платформы
Дмитрий Вовк: Векторизация кода под мобильные платформы
 
Emulating With JavaScript
Emulating With JavaScriptEmulating With JavaScript
Emulating With JavaScript
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to know
 
Introduction to PICAXE Microcontrollers
Introduction to PICAXE MicrocontrollersIntroduction to PICAXE Microcontrollers
Introduction to PICAXE Microcontrollers
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
 
[ENG] IPv6 shipworm + My little Windows domain pwnie
[ENG] IPv6 shipworm + My little Windows domain pwnie[ENG] IPv6 shipworm + My little Windows domain pwnie
[ENG] IPv6 shipworm + My little Windows domain pwnie
 
Rsltollvm
RsltollvmRsltollvm
Rsltollvm
 
Building a robot with the .Net Micro Framework
Building a robot with the .Net Micro FrameworkBuilding a robot with the .Net Micro Framework
Building a robot with the .Net Micro Framework
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform EngineeringJemma Hussein Allen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

軽快なPlan9 (第三回Kernel/VM探検隊)

  • 1. Plan 9 / paravirt.org / @go_vm 2010 2 23 @IIJ Kernel/VM 1
  • 2. / @go_vm • • • KVM 2
  • 3. twitter 3
  • 4. ? Plan 9 ? 4
  • 5. 5
  • 6. Plan 9 • Plan9 • 30 • ” ” • http://circle.paravirt.org/c77 6
  • 7. Plan 9 (2) • ... • KVM VM • Plan9 7
  • 8. 09 12 30 • • 3 50 • 8
  • 9. 2 10 OST • 9
  • 10. 10
  • 11. 11
  • 12. VMM OS OS • KVM VirtualBox VMM VMM • VMM OS OS Type II VMM 12
  • 13. VM CPU • OS CPU • • 13
  • 14. OS TEXT main+0(SB),0,$0 MOVL $1,4(SP) MOVL $.string+0(SB),8(SP) MOVL $14,12(SP) MOVL $20,AX INT $64 MOVL $0,4(SP) MOVL $8,AX INT $64 GLOBL .string+0(SB),$16 DATA .string+0(SB)/8,$”Hello, w” DATA .string+0(SB)/8,$”orld!¥z¥z¥n” END , 14
  • 15. • CPU • : • : ” ” 15
  • 16. 16
  • 17. x86 17
  • 18. x86 18
  • 19. (VMware) • (LilyVM) • (Xen) 19
  • 20. • • 20
  • 21. Intel AMD • CPU • Intel → Intel VT (vmx) • AMD → AMD-V (svm) • vmx svm 21
  • 22. vmx VMX-root mode VMX-non root mode VMEntry ( ( ) ) VMExit VMX-non root mode 22
  • 23. non-root • mode OS OS VMM VMM • mode root OS Type II VMM 23
  • 24. root non-root mode mode VMM OS kernel user mode mode 24
  • 25. • kernel user mode mode sysenter 25
  • 26. 26
  • 27. VMM non-root mode OS vmcall • VMM( ) mode root VMM 27
  • 28. < Plan9> 28
  • 29. Plan9 • Plan9 KVM Plan9 • socket,connect,send,recv Plan9 29
  • 30. (1) TEXT vmcall(SB), $0 MOVL b+0(FP),BX • Plan9 MOVL c+4(FP),CX • BYTE MOVL d+8(FP),DX vmx vmcall MOVL $12345, AX BYTE $0xf BYTE $0x1 • BYTE $0xc1 RET 30
  • 31. (2) • hsocket int hsocket(int dom,int type,int proto) { struct {int d;int t;int p;} arg; arg.d = dom; arg.t = type; • socket arg.p = proto; FD return vmcall(0,(int)&arg,sizeof(arg)); } • KVM 31
  • 32. (3) int hsend(int fd,void *buf,int len,int flg) { • hsend struct {int fd;void *b;int l;int f;} arg; arg.fd = fd; arg.b = buf; arg.l = len; arg.f = flg; • socket return vmcall(2,(int)&arg,sizeof(arg)); send } • 32
  • 33. VMM • hsend VMM int hcall_socket(void *opaque,gva_t arg,int len) { struct {int dom;int type;int proto;} harg; • if(sizeof(harg) != len) return -EINVAL; if(copy_from_guest(opaque,&harg,arg,len)) return -EFAULT; return socket(harg.dom, harg.type, harg.proto); • } socket() 33
  • 34. 34
  • 35. </ Plan9> 35
  • 36. 36
  • 37. Plan9 • • adhoc • Plan9 37
  • 38. Plan9 Plan9 Plan9 38
  • 39. • KVM • VMRPC • Socket Outsourcing 39
  • 40. VMRPC • RPC • → RPC • • • 40
  • 41. VMRPC OS OS 41 41
  • 42. Socket Outsourcing • VMRPC Socket Hypercall Interface • OS Socket API (BSD Socket ) • Linux,Windows • 42
  • 43. OS TCP/IP OS • NIC VMM • OS ‣ 43 43
  • 44. • TCP/IP OS • OS NIC VMM • OS ‣ 44 44
  • 45. • TCP/IP OS OS • OS NIC VMM TCP/IP OS ‣ 45 45
  • 47. • NIC virtio Socket Outsourcing iperf 47
  • 48. • CPU: Intel Core i7 950 3.06GHz • NIC: Intel 82598EB (10G) • VMM: KVM88 (VMRPC ) • OS: Linux 2.6.25(SocketOutsourcing 48
  • 49. 10000 7500 [Mbps] 5000 2500 0 e1000(emu) virtio Sos 49
  • 50. 50
  • 51. Plan9 • • dial API • /net/tcp 51
  • 52. API • Plan9 API Sos Socket • API • Windows * *Improving Virtualized Network Performance by Delegating Network Processing Younggyun Koh,Calton Pu,Yasushi Shinjo,Hideki Eiraku,Go Saito,Daiyuu Nobori IEEE NCA09 52
  • 53. /net/tcp • Plan9 /net/tcp tcp • SocketOutsourcing • API • Plan9 53
  • 54. • • Plan9 54
  • 55. • KVM Plan9 • Plan9 55
  • 56. Demo 56
  • 57. Plan9 Hypercall • Hypercall • Plan9 57