Plan 9           / paravirt.org/ @go_vm2010   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                      ...
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...
VM            CPU•                   OS        CPU    •    •                         13
OSTEXT    main+0(SB),0,$0MOVL    $1,4(SP)MOVL    $.string+0(SB),8(SP)MOVL    $14,12(SP)MOVL    $20,AXINT     $64MOVL    $0...
• 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        ...
vmx      VMX-root mode     VMX-non root mode            VMEntry(                       (                 )                ...
non-root•     mode                 OS            OS               VMM         VMM•    mode    root                OS      ...
root     non-root     mode      mode      VMM                 OS     kernel    user     mode      mode24
•                                •     kernel              user     mode                mode              sysenter25
•    26
•          VMM                 non-root                  mode                              OS                             ...
<   Plan9>             28
Plan9•        Plan9       KVM                             Plan9• socket,connect,send,recv         Plan9                   ...
(1)TEXT vmcall(SB), $0  MOVL b+0(FP),BX                      •   Plan9  MOVL c+4(FP),CX     •           BYTE  MOVL d+8(FP)...
(2)                                            •   hsocketint hsocket(int dom,int type,int proto){  struct {int d;int t;in...
(3)int hsend(int fd,void *buf,int len,int flg){                                             •   hsend  struct {int fd;void...
VMM                                                •   hsend VMMint hcall_socket(void *opaque,gva_t arg,int len){  struct ...
34
</   Plan9>              35
36
Plan9••         adhoc• Plan9                     37
•   Plan9       Plan9        Plan9                        38
• KVM • VMRPC • Socket Outsourcing                        39
VMRPC•                   RPC    •   →    RPC    •    •    •                          40
VMRPCOS      OS             41                  41
Socket Outsourcing•   VMRPC        Socket Hypercall Interface•       OS         Socket API             (BSD Socket        ...
•   OSTCP/IP                    OS                         •         NIC   VMM                         •                  ...
•TCP/IP                    OS                         •   OS         NIC   VMM                         •                  ...
•TCP/IP                       OS                    OS                         •        OS         NIC   VMMTCP/IP        ...
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(SocketOut...
10000          7500[Mbps]          5000          2500             0                 e1000(emu)   virtio   Sos             ...
50
Plan9•    • dial       API    • /net/tcp                       51
API   • Plan9                                   API           Sos Socket       • API       •                   Windows    ...
/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
Upcoming SlideShare
Loading in...5
×

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

1,626

Published on

2010-2-23 軽快なPlan9 (第三回Kernel/VM探検隊)

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,626
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

  1. 1. Plan 9 / paravirt.org/ @go_vm2010 2 23 @IIJ Kernel/VM 1
  2. 2. • / @go_vm•• • KVM 2
  3. 3. • twitter 3
  4. 4. ?Plan 9 ? 4
  5. 5. 5
  6. 6. Plan 9• Plan9• 30• ” ”• http://circle.paravirt.org/c77 6
  7. 7. Plan 9 (2)• ...• KVM VM• Plan9 7
  8. 8. • 09 12 30•• 3 50• 8
  9. 9. • 2 10 OST• 9
  10. 10. 10
  11. 11. 11
  12. 12. • VMM OS OS • KVM VirtualBox VMM VMM • VMM OS OS Type II VMM 12
  13. 13. VM CPU• OS CPU • • 13
  14. 14. OSTEXT main+0(SB),0,$0MOVL $1,4(SP)MOVL $.string+0(SB),8(SP)MOVL $14,12(SP)MOVL $20,AXINT $64MOVL $0,4(SP)MOVL $8,AXINT $64GLOBL .string+0(SB),$16DATA .string+0(SB)/8,$”Hello, w”DATA .string+0(SB)/8,$”orld!¥z¥z¥n”END , 14
  15. 15. • CPU • : • : ” ” 15
  16. 16. 16
  17. 17. x86 17
  18. 18. x86 18
  19. 19. • (VMware)• (LilyVM)• (Xen) 19
  20. 20. •• 20
  21. 21. Intel AMD• CPU • Intel → Intel VT (vmx) • AMD → AMD-V (svm)• vmx svm 21
  22. 22. vmx VMX-root mode VMX-non root mode VMEntry( ( ) ) VMExit VMX-non root mode 22
  23. 23. non-root• mode OS OS VMM VMM• mode root OS Type II VMM 23
  24. 24. root non-root mode mode VMM OS kernel user mode mode24
  25. 25. • • kernel user mode mode sysenter25
  26. 26. • 26
  27. 27. • VMM non-root mode OS vmcall• VMM( ) mode root VMM 27
  28. 28. < Plan9> 28
  29. 29. Plan9• Plan9 KVM Plan9• socket,connect,send,recv Plan9 29
  30. 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. 31. (2) • hsocketint 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. 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. 33. VMM • hsend VMMint 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. 34
  35. 35. </ Plan9> 35
  36. 36. 36
  37. 37. Plan9•• adhoc• Plan9 37
  38. 38. • Plan9 Plan9 Plan9 38
  39. 39. • KVM • VMRPC • Socket Outsourcing 39
  40. 40. VMRPC• RPC • → RPC • • • 40
  41. 41. VMRPCOS OS 41 41
  42. 42. Socket Outsourcing• VMRPC Socket Hypercall Interface• OS Socket API (BSD Socket )• Linux,Windows • 42
  43. 43. • OSTCP/IP OS • NIC VMM • OS ‣ 43 43
  44. 44. •TCP/IP OS • OS NIC VMM • OS ‣ 44 44
  45. 45. •TCP/IP OS OS • OS NIC VMMTCP/IP OS ‣ 45 45
  46. 46. Socket Outsourcing• VMM• VMRPC• 46
  47. 47. • NIC virtio Socket Outsourcing iperf 47
  48. 48. • • CPU: Intel Core i7 950 3.06GHz • NIC: Intel 82598EB (10G)• VMM: KVM88 (VMRPC )• OS: Linux 2.6.25(SocketOutsourcing 48
  49. 49. 10000 7500[Mbps] 5000 2500 0 e1000(emu) virtio Sos 49
  50. 50. 50
  51. 51. Plan9• • dial API • /net/tcp 51
  52. 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. 53. /net/tcp • Plan9 /net/tcp tcp • SocketOutsourcing • API • Plan9 53
  54. 54. •• Plan9 54
  55. 55. • KVM Plan9• Plan9 55
  56. 56. Demo 56
  57. 57. • Plan9 Hypercall• Hypercall• Plan9 57
  58. 58. http://circle.paravirt.org/c77 58
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×