CN106502721A - A kind of order discharging method, device and physical machine - Google Patents

A kind of order discharging method, device and physical machine Download PDF

Info

Publication number
CN106502721A
CN106502721A CN201610853875.5A CN201610853875A CN106502721A CN 106502721 A CN106502721 A CN 106502721A CN 201610853875 A CN201610853875 A CN 201610853875A CN 106502721 A CN106502721 A CN 106502721A
Authority
CN
China
Prior art keywords
data
operated
virtual
main frame
source address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610853875.5A
Other languages
Chinese (zh)
Other versions
CN106502721B (en
Inventor
陆丽娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610853875.5A priority Critical patent/CN106502721B/en
Publication of CN106502721A publication Critical patent/CN106502721A/en
Application granted granted Critical
Publication of CN106502721B publication Critical patent/CN106502721B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of order discharging method, device and physical machine, are related to communication technical field, the waste of the hardware resource to physical machine can be effectively reduced when operational order (such as copy or clear command) is processed.The method of the present invention includes:Virtual machine intercepts and captures the operational order that application program is issued, and operational order is treated peration data for instruction and executes assigned operation;Virtual machine generates unloading order, and sends unloading order to main frame according to operational order, and unloading order includes copy unloading order or resets unloading order;The virtual source address unloaded in order is converted to main frame the physical source address of data to be operated, and virtual source address is used for representing position of the data to be operated in the virtual disk of virtual machine;Main frame is treated peration data and executes assigned operation according to the virtual destination address in unloading order and the physical source address of data to be operated.The present invention is applied to order uninstall process.

Description

A kind of order discharging method, device and physical machine
Technical field
The present invention relates to communication technical field, more particularly to a kind of order discharging method, device and physical machine.
Background technology
At present, the copy either in order to realize between virtual machine is unloaded or the clearing command of virtual machine itself was unloaded Journey, is required for virtual machine after the operational order that application program is issued is received, by operational order via IO (English: Input/Output, Chinese:Input/output) ring is sent to back-end process, and generated according to the operational order by main frame corresponding SCSI (English:Small Computer System Interface, Chinese:Small computer system interface) instruction, Zhi Houfa Deliver to such as IP SAN (English:IP based SAN, Chinese:IP-based SAN equipment) etc. physical storage device, deposited by physics Storage equipment is parsed and executes the SCSI command, so as to complete copy or the clear operation of data on physical storage device.
As can be seen here, aforesaid operations in the process of implementation, need for the SCSI command of generation to be eventually sent to corresponding thing Reason storage device, is executed corresponding operation afterwards by the physical storage device.However, it is contemplated that the copy of above-mentioned data or Clear operation is required for the PHY hardware device by physical machine to complete, or even needs the CPU (English of physical machine:Central Processing Unit, Chinese:Central processing unit) and Internet resources participation, the hardware resource requirements to physical machine are higher, Also bring to physical machine hardware resource and the waste on Internet usage.
Content of the invention
The present invention provides a kind of order discharging method, device and physical machine, can reduce and process operational order (as copied Or clear command) when, the waste to the hardware resource of physical machine.
For reaching above-mentioned purpose, the present invention is adopted the following technical scheme that:
In a first aspect, the present invention provides a kind of order discharging method, the method is used for physical machine, and physical machine operation has main frame Host, operation on the main frame have virtual machine.The method includes:Virtual machine intercepts and captures the operational order that application program is issued, the operation Instruct peration data execution assigned operation is treated for instruction;Virtual machine generates unloading order according to operational order, and to main frame Unloading order is sent, the unloading order includes copy unloading order or resets unloading order;Main frame will unload the virtuality in order Source address is converted to the physical source address of data to be operated, and the virtual source address is used for representing void of the data to be operated in virtual machine Intend the position in disk;Main frame is treated according to the virtual destination address in unloading order and the physical source address of data to be operated Peration data executes assigned operation.As can be seen here, although so needing virtual machine and main frame jointly to complete holding for assigned operation Row process, but due to main frame be the unloading order that generated according to virtual machine completing assigned operation, therefore, no matter current application The system of the present invention is cluster file system, distributed sha red memory system, or other systems, main frame are capable of identify that this unloads Carry order.Also, main frame and virtual machine belong to a part for physical machine, in above-mentioned implementation procedure, mainly connect by main frame Corresponding operating is executed after receiving unloading order, and is executed without the need for physical storage device and operate accordingly, therefore, using the present invention The implementation for being provided, effectively can be reduced to physical machine when operational order (such as copy or clear command) is processed The waste of hardware resource.
In a kind of possible design, when assigned operation is copy function, data to be operated include at least one data Block, virtual machine can generate the copy unloading order of each data block at least one data block, and send per number to main frame Copy unloading order according to block.It should be noted that virtual machine can generate the copy unloading order of each data block simultaneously, and Pack and send to main frame, or only generate the copy unloading order of a data block every time, and send to main frame, work as main frame afterwards After having executed the copy function that the copy unloading order is indicated, next copy unloading order is regenerated, is executed for main frame, directly All data blocks into data to be operated all complete copy function.
In a kind of possible design, after the operational order that virtual machine intercepts and captures that application program is issued, virtual machine is also needed To send to main frame and create instruction, in the establishment instruction, carry the length of data block in the copy unloading order of each data block Degree, creating instruction is used for creating empty file in the disk file system of purpose virtual machine, and purpose virtual machine operates in virtual machine On the main frame of operation, or operate on the main frame in addition to main frame;Virtual machine receives the virtual destination of purpose virtual machine Location, the virtual destination address is the virtual address of the purpose data block for distributing to data to be operated in empty file, purpose data block Length more than or equal to each data block copy unloading order in data block length.So, it is possible to guarantee to lead Machine, when copy function is executed, has been that current copy procedure reserves certain space in purpose virtual machine, i.e., above-mentioned establishment Empty file.
In a kind of possible design, the method is applied to distributed sha red memory system, then peration data treated by main frame Assigned operation is executed, can be implemented as:The virtual destination address of data to be operated is updated to data to be operated by main frame Physical source address;Virtual destination address of the main frame according to renewal, by corresponding for the physical source address of data to be operated data block The numerical value of reference count adds one, and the value of the reference count is used for representing that the corresponding data block of the physical address of data to be operated to be drawn Number of times.As can be seen here, the copy function of data to be operated is realized using aforesaid way, is only established between address Mapping relations, and increase the reference count of the physical source address of data to be operated.Therefore, for virtual machine, void is reduced Consumption of the plan machine storage operation to virtual machine calculating network resource, meanwhile, the effect of acceleration is also acted by increasing reference count Really.
In a kind of possible design, the method is applied to cluster file system, then main frame is treated peration data and executed and refers to Fixed operation, can be implemented as:Main frame sets up the virtual destination address of data to be operated and the physical resource ground of data to be operated Mapping relations between location;Main frame is by the thing of corresponding for the physical source address of data to be operated data block copy to data to be operated Reason destination address;The physical source address of the data to be operated in mapping relations is replaced with main frame the physics purpose of data to be operated Address.As can be seen here, the copy function of data to be operated is realized using aforesaid way, is needed first by data block from physical resource ground Location copies physics destination address to, the mapping relations that is set up between virtual source address and physics destination address afterwards.For virtuality For machine, consumption of the virtual machine storage operation to virtual machine calculating network resource is reduced, but it is possible to be compared to former Design, then be unable to reach the effect that effectively copy accelerates.
In a kind of possible design, the virtual source address unloaded in order is converted to main frame the physics of data to be operated The process of source address, can be implemented as:In the case where the storage mode of data to be operated is block storage, main frame will be waited to grasp The virtual source address for making data is converted to the physical source address of data to be operated;Or, in the storage mode of data to be operated it is In the case that object is stored, the virtual source address of data to be operated is converted to object identity by main frame, and object identity is to be operated The mark of the corresponding data block of data.As can be seen here, for different storage modes, need using different address conversion sides Formula.
In a kind of possible design, when unloading order is for resetting unloading order, main frame is according to the void in unloading order Intend the physical source address of destination address and data to be operated, treat the process that peration data executes assigned operation, can be specifically real It is now:When the virtual disk that virtual disk is digital simulation to be operated, main frame is by the ratio of the physical source address of data to be operated Each clearing in special figure;Or, when the virtual disk that virtual disk is distributed sha red memory system simulation, main frame will be treated The object identity release of peration data, and discharge the corresponding data block of data to be operated;Or, when virtual disk is group document During the virtual disk of system simulation, the data block of data to be operated is discharged by main frame;Or, when the void that there are no data to be operated When intending the mapping relations between source address and the physical source address of data to be operated, main frame is by the physical source address of data to be operated Corresponding data block writes zero.As can be seen here, in the present invention, the analog case according to virtual disk is needed, and it is suitable to select Clearing scheme.
Second aspect, the present invention provide a kind of order discharge mechanism, and the order discharge mechanism includes main frame Host and virtuality Machine.Virtual machine, for intercepting and capturing the operational order that application program is issued, operational order is treated peration data execution for instruction and is specified Operation;Virtual machine, is additionally operable to according to operational order, generates unloading order, and sends unloading order to main frame, and unloading order includes Copy unloading order resets unloading order;Main frame, for being converted to data to be operated by the virtual source address in unloading order Physical source address, virtual source address be used for represent position of the data to be operated in the virtual disk of virtual machine;Main frame, also uses In the physical source address according to the virtual destination address in unloading order and data to be operated, treat peration data and execute specified behaviour Make.Mentioned order discharge mechanism can be used for completing the function in said method example performed by main frame and virtual machine, the function Can be realized by hardware, it is also possible to corresponding software is executed by hardware and is realized.Wherein, the hardware or software are included at least The corresponding module of one above-mentioned functions.It should be noted that the main frame and virtual machine in mentioned order discharge mechanism can be used for Realize the various functions described in first aspect.
The third aspect, the present invention provide a kind of physical machine.The physical machine includes hardware layer, operates in master on hardware layer Machine Host and virtual machine.Virtual machine, for intercepting and capturing the operational order that application program is issued, operational order is used for indicating to be operated Data execute assigned operation;Virtual machine, is additionally operable to according to operational order, generates unloading order, and sends unloading order to main frame, Unloading order includes copy unloading order or resets unloading order;Main frame, for changing the virtual source address in unloading order For the physical source address of data to be operated, virtual source address is used for representing position of the data to be operated in the virtual disk of virtual machine Put;Main frame, is additionally operable to the physical source address according to the virtual destination address in unloading order and data to be operated, treats operand According to execution assigned operation.
In addition, processor, input equipment, outut device can also be included in the physical machine.The processor is configured to prop up Hold the physical machine and execute corresponding function in said method.The input equipment and outut device can be considered communication interface, use Communication between the support physical machine and other equipment.It should be noted that the physical machine can also include memorizer, this is deposited Reservoir is used for coupling with processor, can specifically include for realizing virtual machine and the master of the various functions described in first aspect Machine, can also preserve the necessary programmed instruction of the physical machine and data in addition.
Order discharging method, device and physical machine that the present invention is provided, are compared in prior art by physical store Executing assigned operation, in the present invention, the operational order that virtual machine can be issued according to application program is unloaded equipment to generate Order is carried, is sent order is unloaded to main frame from virtual machine afterwards;Main frame receive virtual machine transmission unloading order after, The physical source address that virtual source address entrained for unloading order is converted to data to be operated, afterwards, main frame can be according to unloading The physical source address of the entrained virtual destination address of order and above-mentioned data to be operated is carried, peration data is treated and is executed specified behaviour Make.Although so need virtual machine and main frame jointly to complete the implementation procedure of assigned operation, as main frame is according to virtuality The unloading order that machine is generated completing assigned operation, therefore, no matter the system of the current application present invention be cluster file system, Distributed sha red memory system, or other systems, main frame are capable of identify that the unloading order.Also, main frame and virtual machine are equal Belong to a part for physical machine, in above-mentioned implementation procedure, corresponding behaviour is executed after unloading order is received by main frame mainly Make, and corresponding operation is executed without the need for physical storage device, therefore, using implementation provided by the present invention, can be at place During reason operational order (such as copy or clear command), the waste of the hardware resource to physical machine is effectively reduced.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below by to be used needed for embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, can be other attached to be obtained according to these accompanying drawings Figure.
Fig. 1 is a kind of data center's structural representation provided in an embodiment of the present invention;
Fig. 2 is another kind of data center's structural representation provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram that interaction realized by a kind of virtual machine provided in an embodiment of the present invention and main frame;
Fig. 4 is a kind of order discharging method interaction figure provided in an embodiment of the present invention;
Fig. 5 is another kind of order discharging method interaction figure provided in an embodiment of the present invention;
Fig. 6 is another kind of order discharging method interaction figure provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of order discharge mechanism provided in an embodiment of the present invention;
Fig. 8 is a kind of structural representation of physical machine provided in an embodiment of the present invention.
Specific embodiment
Accompanying drawing in below in conjunction with the embodiment of the present invention, to the embodiment of the present invention in technical scheme carry out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiment.It is based on Embodiment in the present invention, it is all other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention can apply to different data center's structures, and the embodiment of the present invention is not limited.Such as:Should Data center's structure can specially be provided with the structure of cluster file system, or Server San frameworks etc..
A kind of data center's structure for being provided with cluster file system 01 is illustrated in figure 1, can be wrapped in the data center Multiple main frames are included, such as includes main frame 100, main frame 200 and main frame 300.One or many can be run inside each main frame Individual virtual machine, such as runs virtual machine 10 and virtual machine 11 on host 100, and wherein, each virtual machine can be included at least One virtual disk, such as virtual machine 10 include virtual disk 12, and the rear end of each virtual disk can have a rear end Storage service process, such as back-end process 14, provide service to be embodied as corresponding virtual machine.Wherein, back-end process can be Qemu processes, or special back-end process, such as blkback, vhost etc..Back-end process will can be transmitted through I O ring Order and send to cluster file system 01, and sent to IP SAN03 through network 02 from cluster file system 01, afterwards by IP SAN03 is processed to the order.
A kind of Server San frameworks for being provided with distributed sha red memory system are illustrated in figure 2, the data center is same Sample can also include running one or more virtual machines, virtual machine internal structure inside multiple main frames, and each main frame Similar with the virtual machine in framework as shown in Figure 1, will not be described here.Difference with Fig. 1 is that back-end process can be by through I O ring The order of transmission is sent to distributed sha red memory system 04, and it is right to be transmitted to order by distributed sha red memory system 04 afterwards The local disk that answers, and the order is processed by local disk.It should be noted that above-mentioned local disk can be transmission The local disk inside the main frame of virtual machine place corresponding to the back-end process of the order, or it is arranged on other main frames Virtual disk.In such as main frame 400, virtual machine 40 will be ordered to distributed sha red memory system eventually through back-end process 44 04 sends, and it is to local disk 46, local by the order that Distributed sharing system 04 is determined according to the order implication of itself Disk 47 sends, or the local disk in being located at main frame 500 or main frame 600 sends.It should be noted that local disk Quantity with inside main frame set by virtual machine quantity unrelated, can be configured according to self-demand, in such as main frame 500 Although including virtual machine 50 and virtual machine 51, only include local disk 56 in main frame 500, although likewise, in main frame 600 Only include virtual machine 60, but multiple local disks, i.e. local disk 63 and local disk 64 can be set in main frame 600.
The embodiment of the present invention provides a kind of order discharging method, can apply to virtual machine 700a as shown in Figure 3, and should Virtual machine 700a is may be located in above two data center structure, but is not only limited in above two data center structure. In embodiments of the present invention, inside virtual machine 700a, operational order can be realized based on file system 73posix interface Capture, that is, when application program issues the operational orders such as copy, clearing, the operational order can be caught by virtual machine 700a Obtain, and generate corresponding unloading order, and pass to front end process 71.I O ring is put into afterwards by front end process 71 by order is unloaded The back-end process 73 inside main frame 700b is passed in 72, and the unloading order is parsed by back-end process 73, finally give distribution Formula shared memory systems 04 or cluster file system 01 are processed.Specific implementation can be proposed later, and here is not done superfluous State.
By taking above two data center structure as an example, as shown in figure 4, the method can apply to physical machine, the physical machine On can run main frame (English:Host), can also run virtual machine on the main frame, the present invention can by the virtual machine with Jointly realizing, the method flow process includes the main frame:
101st, virtual machine intercepts and captures the operational order that application program is issued.
Wherein, operational order is treated peration data for instruction and executes assigned operation.
The operational order issued by the application program of virtual machine can include clear command or copy instruction, such as virtual APP (English in machine:Application, Chinese:Application program) issue x length to f deviation posts in file A write 0 behaviour Make, or the APP in source virtual machine issues copy instruction, catalogue b for copying file A to destination virtual machines from catalogue a. It should be noted that copy instruction can include across virtual machine copy instruction, and copy function is carried out on same virtual machine Virtual machine internal copy instruction at least one.
It should be noted that in the present invention, virtual machine can recognize the operational order that application program is issued, and intercept and capture The operational order.
102nd, virtual machine generates unloading order according to operational order.
Wherein, unloading order includes copy unloading order or resets unloading order.
It should be noted that virtual machine can generate unloading order according to the operational order that is intercepted and captured, and by front end process By the unloading order for generating, by I O ring, process sends to the back-end.
103rd, virtual machine sends unloading order to main frame.
104th, the virtual source address unloaded in order is converted to main frame the physical source address of data to be operated.
Wherein, virtual source address is used for representing position of the data to be operated in the virtual disk of virtual machine.
The physical source address of virtual destination address and data to be operated during the 105, main frame is ordered according to unloading, to be operated Data execute assigned operation.
After the unloading order that main frame receives virtual machine transmission, the unloading order is parsed, and according to the unloading order Indicated action type is completing assigned operation.As shown in figure 3, the back-end process 73 in main frame 700b is receiving virtual machine After the unloading order that 700a sends, send to distributed sha red memory system 04 or cluster file system 01, and according to difference System type, assigned operation is completed using corresponding mode.
In the present invention, the operational order that virtual machine can be issued according to application program unloads order to generate, afterwards Sent order is unloaded to main frame from virtual machine;Unloading is ordered after the unloading order for receiving virtual machine transmission by main frame Entrained virtual source address is converted to the physical source address of data to be operated, and afterwards, main frame can be taken according to unloading order The virtual destination address of band and the physical source address of above-mentioned data to be operated, treat peration data and execute assigned operation.Though so So need virtual machine and main frame jointly to complete the implementation procedure of assigned operation, but due to main frame be according to unloading that virtual machine is generated Carry order to complete assigned operation, therefore, no matter the system of the current application present invention is cluster file system, Distributed sharing Storage system, or other systems, main frame are capable of identify that the unloading order.Also, main frame and virtual machine belong to physical machine A part, in above-mentioned implementation procedure, mainly execute corresponding operating by main frame after unloading order is received, and without the need for thing Reason storage device executes corresponding operation, therefore, using implementation provided by the present invention, can process operational order When (such as copy or clear command), the waste of the hardware resource to physical machine is effectively reduced.
Consider that, when assigned operation is for copying, the number of the data block included by data to be operated is at least one, is Guarantee to copy carrying out complete for data to be operated, in an implementation of the embodiment of the present invention, need to distinguish The copy unloading order of each data block is generated, so that main frame is able to carry out the copy function of each data block.Therefore, as schemed Step 102 virtual machine shown in 4 generates unloading order, can be implemented as step 1021 according to operational order;Such as Fig. 4 institutes 103 virtual machine of the step of showing sends unloading order to main frame, can be implemented as step 1031:
1021st, virtual machine generates the copy unloading order of each data block at least one data block.
1031st, virtual machine sends the copy unloading order of each data block to main frame.
In the present invention, the copy unloading order of each data block can be sent by virtual machine simultaneously together to main frame, or A copy unloading order is sent every time to main frame only, and after the main frame has executed this copy unloading order, then to The main frame sends next copy unloading order, until the main frame has executed the indicated operation of all copy unloading orders.
It should be noted that virtual machine can be corresponding to generate each data block according to the sequencing for generating data block Copy unloading order, and executed the copy function of each data block by main frame successively, but in the present invention, do not limit virtual machine The order of copy unloading order is generated, and main frame executes the order of copy function, as long as may insure that data to be operated can All it is copied.
Furthermore, it is contemplated that copy function is in the process of implementation, establishment one in purpose virtual machine is needed to treat for storage The empty file of peration data, therefore, before aforesaid operations are carried out, needs first to create in the disk file system of purpose virtual machine Build empty file.After having executed step 101 virtual machine as shown in Figure 4 and having obtained the operational order that application program is issued, also need Want execution step 106 and step 107:
106th, virtual machine sends to main frame and creates instruction.
Wherein, the length of data block in the copy unloading order for carry in instruction each data block is created, instruction is created For creating empty file in the disk file system of purpose virtual machine, purpose virtual machine operates in the main frame of virtual machine operation On, or operate on the main frame in addition to main frame.
107th, virtual machine receives the virtual destination address of purpose virtual machine.
Wherein, virtual destination address is the virtual address of the purpose data block for distributing to data to be operated in empty file, mesh Data block length more than or equal to each data block copy unloading order in data block length.
So, it becomes possible to reserve certain depositing in the disk file system of purpose virtual machine for data to be operated Storage space, in order to copy data to be operated to purpose source address from virtual source address.
So that copy function as shown in Figure 5 executes flow process as an example, step is implemented as follows:
201st, VM (English:Virual Machine, Chinese:Virtual machine) APP in 1 issues copy instruction.
Wherein, copy instruction is specially catalogue b that file A is copied to VM3 from catalogue a;It is empty that VM1 can be considered source Plan machine, VM3 can be considered purpose virtual machine.
It should be noted that copy instruction can be realized on same virtual machine, or realize on different virtual machine.When When copy instruction is realized on different virtual machine, VM1 and VM3 is different virtual machine;When copy is instructed on same virtual machine in fact Now, VM1 and VM3 is same virtual machine.
202nd, VM1 intercepts and captures copy instruction.
203rd, VM1 notifies VM3 to create purpose empty file.
If VM1 and VM3 is same virtual machine, then after VM1 (i.e. VM3) intercepts and captures copy instruction, can directly at this Purpose empty file is created in the disk file system on ground.It should be noted that interaction diagrams as shown in Figure 5 are VM1 and VM3 Belong to interaction flow during different virtual machine.
204th, VM3 creates purpose empty file in local disk file system.
205th, VM1 initialization files skew f=0.
Multiple data blocks be there may be in view of file, and copy function can only be directed to a number every time in general Carry out according to block, therefore, document misregistration f set here is for judging whether to proceed which during subsequent execution The condition of the copy function of his data block.Also imply that, until skew f and the data block of file A to be copied of file A When offseting identical, terminate copy function.
It should be noted that above-mentioned discriminant approach is to be copied according to the genesis sequence of each data block in file successively Operation, but be not limited only to aforesaid way in the present invention, it is also possible to out of order carry out copy function, as long as ensure that this document In all data blocks complete copy.
206th, judge whether f is more than or equal to the skew of end-of-file.
Wherein, when f is more than or equal to the skew of end-of-file, terminate copy function;Otherwise, step 207 is continued executing with.
207th, the file system in VM1 obtains skew f corresponding datas block B (vlba, vlen).
Wherein, data block B is the initial data block in file A to be copied, and vlba is the initial fictive source ground of data block B Location, length of the vlen for data block B.
208th, VM3 distributes corresponding data block C (vlba, vlen) in file system.
In order to ensure that data block B can be completely copied to data block C, in the present invention, data block B and data block C Vlen can with identical, or, the length of the length of data block C more than data block B.It should be noted that dividing shown in step 208 With operation simply in purpose virtual machine, i.e., distribute in the file system of VM3, rather than be truly issued to the actual stored of rear end The distribution in space is carried out in equipment.Also imply that, the operation scheme realized by the present invention can be deposited without the help of actual physics Storage equipment.
209th, VM1 generates copy unloading order (copy, VM1.B.vlba, VM3.C.vlba, vlen).
In the present invention, copy unloading order form be action type, virtual source address, virtual destination address, length. Wherein, action type is copy, and virtual source address is the vlba of data block B in VM1, and virtual destination address is data block C in VM3 Vlba, length for data block B length, while can also be the length of data block C, i.e. vlen.
210th, the front end process of VM1 is sent unloading order is copied to the back-end process of main frame via I O ring.
211st, after the back-end process of main frame receives copy unloading order, parsing copy unloading order is parsed Copy unloading order (copy, plba1, VM3.C.vlba, plen) afterwards.
Wherein, the form of the copy unloading order after parsing is action type, and physical source address, virtual destination address are long Degree.Wherein, action type is copy, plba of the physical source address for data block B, the i.e. physical address of data block B, virtual purpose Address is the vlba of data block C in VM3, and length is data block B corresponding length, i.e. plen in local disk.
212nd, VM3.C.vlba is pointed to plba1 by main frame, and increases the reference count of plba1 corresponding data blocks.
It should be noted that step 212 provide only a kind of mode for specifically treating peration data execution assigned operation, I.e. when above-mentioned implementation is used for distributed sha red memory system, VM1, VM3 and main frame are how to realize said process, and For when method provided by the present invention is applied to cluster file system, can be found in step 1053 to step 1055, here is not Repeat.In addition, in the step 212, VM3.C.vlba point to plba1 can be considered as establish VM3.C.vlba and plba1 it Between mapping relations.
213rd, main frame will copy result and return VM1.
214th, in VM1, f+=B.vlen.
It should be noted that length of the B.vlen for data block B;Only when file A complete copies to be copied are to specific bit Put, i.e., in the file system of VM3 after, aforesaid operations flow process could be terminated, otherwise will circulation execute above-mentioned steps 206 to step 214, until traversing the end-of-file of file A, that is, until will be complete for all data block copies in file.
Consider, when technical scheme provided by the present invention is applied to different pieces of information division center, to have different copies Method, in an implementation of the embodiment of the present invention, when the method for the present invention is applied to distributed sha red memory system, Can pass through to change the mapping relations between address, and increase the reference of the corresponding data block of the physical source address of data to be operated Count, complete copy function.Therefore, on the basis of above-mentioned implementation, step 105 main frame is according to the void in unloading order Intend the physical source address of destination address and data to be operated, treat peration data and execute assigned operation, step can be implemented as Rapid 1051 and step 1052:
1051st, the virtual destination address of data to be operated is updated to main frame the physical source address of data to be operated.
1052nd, virtual destination address of the main frame according to renewal, by corresponding for the physical source address of data to be operated data block The numerical value of reference count add one.
Wherein, the value of reference count is used for representing that the corresponding data block of physical address of data to be operated to be cited time Number.
So that copy function as shown in Figure 5 executes flow process as an example, when method is applied to distributed sha red memory system, main The mapping relations that machine can be set up between VM3.C.vlba and plba1, and increase the reference count of plba1 corresponding data blocks, from And complete the copy function of data block B.
In the present invention, the copy function of data to be operated is realized using aforesaid way, is only established between address Mapping relations, and increase the reference count of the physical source address of data to be operated.Therefore, for virtual machine, reduce Consumption of the virtual machine storage operation to virtual machine calculating network resource, meanwhile, acceleration is also acted by increasing reference count Effect.
In addition, when the method for the present invention is applied to cluster file system, can pass through the physical resource of data to be operated The corresponding data block in address is copied, and the physical source address in mapping relations is changed into physics destination address afterwards, has been come Into copy function.Therefore, on the basis of above-mentioned implementation, step 105 main frame is according to the virtual destination in unloading order Location and the physical source address of data to be operated, treat peration data and execute assigned operation, can also be implemented as step 1053 To step 1055:
1053rd, reflecting between the virtual destination address of data to be operated and the physical source address of data to be operated set up by main frame Penetrate relation.
1054th, main frame is by the physics mesh of corresponding for the physical source address of data to be operated data block copy to data to be operated Address.
1055th, the physical source address of the data to be operated in mapping relations is replaced with main frame the physics mesh of data to be operated Address.
So that copy function as shown in Figure 5 executes flow process as an example, when method is applied to cluster file system, main frame can be with By the data block copy of plba1 to plba2, and the mapping relations that sets up between VM3.C.vlba and plba2, so as to complete data The copy function of block B.
In the present invention, the copy function of data to be operated is realized using aforesaid way, is needed first by data block from thing Reason source address copies physics destination address to, the mapping relations that is set up between virtual source address and physics destination address afterwards.Right For virtual machine, consumption of the virtual machine storage operation to virtual machine calculating network resource is reduced, but is compared to step 1051 and step 1052 shown in implementation, it is impossible to reach the effect that effectively copy accelerates.
As, in data structure center, the storage mode of data to be operated may be that block is stored or object storage, and Before copy function is carried out, the conversion for completing the virtual source address of data to be operated for different storage modes is needed to grasp Make, in an implementation of the embodiment of the present invention, be respectively directed to different storage modes and provide number to be operated specifically According to the scheme changed of virtual source address.Therefore, on the basis of above-mentioned implementation, step 104 main frame will unload life Virtual source address in order is converted to the physical source address of data to be operated, can be implemented as step 1041 or step 1042:
1041st, in the case that the storage mode in data to be operated is block storage, main frame is by the virtual source of data to be operated Address conversion is the physical source address of data to be operated.
1042nd, in the case that the storage mode in data to be operated is object storage, main frame is by the virtuality of data to be operated Source address is converted to object identity.
Wherein, object identity is the mark of the corresponding data block of data to be operated.
It should be noted that in the back-end process parsing unloading order of main frame, need to be changed vlba, vlen, The virtual source address vlba that storage mode is the data to be operated that block is stored specifically can be converted to physical resource ground by back-end process Location plba, or by the virtual source address vlba that storage mode is the data to be operated that object is stored, be converted to object identity oid.
In the present invention, during the back-end process of main frame carries out unloading command analysis, can be by data to be operated Virtual source address is changed, and gives distributed sha red memory system afterwards or cluster file system is processed.
When the operation indicated by the operational order that the application program in virtual machine is issued is for resetting, in the embodiment of the present invention An implementation in, can be selected according to the analog case of virtual disk suitably reset method.Therefore, in such as Fig. 4 On the basis of shown implementation, step 105 main frame is according to the virtual destination address and data to be operated unloaded in order Physical source address, treats peration data and executes assigned operation, can also be implemented as in step 1056 to step 1059 ?:
1056th, when the virtual disk that virtual disk is digital simulation to be operated, main frame is by the physical resource of data to be operated Each clearing in the bit diagram of address.
1057th, when the virtual disk that virtual disk is distributed sha red memory system simulation, main frame is by data to be operated Object identity release, and discharge the corresponding data block of data to be operated.
1058th, when the virtual disk that virtual disk is cluster file system simulation, main frame is by the data of data to be operated Block discharges.
1059th, when the mapping between the physical source address of the virtual source address that there are no data to be operated and data to be operated During relation, corresponding for the physical source address of data to be operated data block is write zero by main frame.
For example:If virtual disk is by vhd (English:Microsoft Virtual Hard Disk format, in Text:Virtual disk form) file simulation, then the bitmap clear 0 of plba addresses will be corresponded in vhd files;If virtual Disk is provided by Server San, then by the object identity release of corresponding blocks in Server San, and discharge corresponding data Block;If virtual disk is provided by cluster file system, by the data block of plba respective files in cluster file system Release;If there is no metadata, then corresponding for plba data block is write 0, and this method can only reduce virtual machine storage behaviour Make the consumption to virtual machine calculating network resource, but play the effect of acceleration without the above-mentioned three kinds of implementation methods of the image of Buddha like that.
So that clear operation as shown in Figure 6 executes flow process as an example, step is implemented as follows:
301st, the APP in VM1 issues clear command.
Wherein, clear command is specifically as follows to issue f skews in file A and writes 0 operation.
302nd, VM1 intercepts and captures clear command, and clear command is converted to clearing unloading order (resetting, vlba, vlen).
In the present invention, reset unloading order form be action type, virtual source address, length.Wherein, action type For resetting, vlba of the virtual source address for data block B in VM1, length of the length for data block B, i.e. vlen.
303rd, the front end process of VM1 will reset unloading order via I O ring process transmission to the back-end.
304th, after the back-end process of main frame receives clearing unloading order, parsing resets unloading order, is parsed Clearing unloading order (resetting, plba1, plen) afterwards.
Wherein, after parsing clearing unloading order form be action type, physical source address, length.Wherein, class is operated For resetting, plba of the physical source address for data block B, length are data block B corresponding length in local disk to type, i.e., plen.
305th, to plba, the metadata corresponding to plen executes clear operation to main frame.
Wherein, metadata is used for representing the mapping relations between virtual source address and physical source address.It should be noted that In the present invention, the concrete process for executing clear operation includes but are not limited to above-mentioned steps 1056 to shown in step 1059 For the different clearing methods taken by different situations, will not be described here.
306th, main frame will reset result and return VM1.
In the present invention, it is the instruction that indicates clear operation to get the operational order that application program issues in virtual machine When, main frame can select suitably to reset method according to the analog case of virtual disk, treat peration data afterwards and execute clearly Z-operation.
The above-mentioned main angle interacted from virtual machine and main frame is described to scheme provided in an embodiment of the present invention.Can To be understood by, in order to realize above-mentioned functions, present invention also offers a kind of order discharge mechanism 80, as shown in fig. 7, the device 80 contain the execution corresponding software module of each function.Those skilled in the art should be readily appreciated that, in conjunction with herein The unit and algorithm steps of each example of the disclosed embodiments description, the present invention can be with hardware or hardware and computer software Combining form realizing.Certain function is executed in the way of hardware or computer software drive hardware actually, is depended on The application-specific of technical scheme and design constraint.Professional and technical personnel can use not Tongfang to each specific application Method is realizing described function, but this realizes it is not considered that beyond the scope of this invention.
The embodiment of the present invention can carry out the division of functional module according to said method example to device 80, for example, it is possible to Each function corresponding divides each functional module, it is also possible to which two or more functions are integrated in a processing module In.Above-mentioned integrated module both can be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.Need It is noted that be schematic, only a kind of division of logic function to the division of module in the embodiment of the present invention, actual real There can be other dividing mode now.
In the case where each functional module is divided using each function corresponding, Fig. 7 shows involved in above-described embodiment And device 80 a kind of possible structural representation, device 80 includes:Virtual machine 81 and main frame 82.Virtual machine 81, for cutting The operational order that application program is issued is obtained, operational order is treated peration data for instruction and executes assigned operation;Virtual machine 81, also For according to operational order, generating unloading order, and unloading order is sent to main frame 82, unloading order includes copy unloading order Or reset unloading order;Main frame 82, for the virtual source address in unloading order to be converted to the physical resource ground of data to be operated Location, virtual source address are used for representing position of the data to be operated in the virtual disk of virtual machine 81;Main frame 82, is additionally operable to basis The physical source address of virtual destination address and data to be operated in unloading order, treats peration data and executes assigned operation.
In the present invention, virtual machine 81 is applied not only to the process 101 in execution Fig. 4 to process 103, is additionally operable to execute Fig. 5 With all processes performed by VM1 in Fig. 6;Main frame 82 is applied not only to execute the process 104 and process 105 in Fig. 4, is additionally operable to hold All processes in row Fig. 5 and Fig. 6 performed by main frame.Wherein, all phases of each step that said method embodiment is related to are inside the Pass Hold the function description that can quote corresponding function module, will not be described here.Additionally, the main frame 82 and virtuality in device 80 Machine 81, can be also used for other processes for executing techniques described herein.In the present invention, can also include using in device 80 In the communication module 83 communicated with extraneous other equipment, and for store program codes and data memory module 84.Its In, the communication module 83 can be specifically transceiver, transmission circuit or communication interface etc., and the memory module 84 can be deposited Reservoir, main frame 82 and virtual machine 81 can be integrated in the memory module 84, or, the memory module 84 can be at least two Individual, and be separately positioned on inside main frame 82 and virtual machine 81.Additionally, in device 80, processing module 85 can also be included.Its In, the processing module 85 can be processor or controller, for example, can be central processing unit, general processor, digital signal Processor (English:Digital Signal Processor, referred to as:DSP), special IC (English:Application- Specific Integrated Circuit, referred to as:ASIC), field programmable gate array (English:Field Programmable Gate Array, referred to as:) or other PLDs, transistor logic, hardware FPGA Part or its combination in any.Which can be realized or execute with reference to the various exemplary logic described by the disclosure of invention Square frame, module and circuit.The processor can also be the combination for realizing computing function, for example, include one or more microprocessors Device is combined, combination of DSP and microprocessor etc..
The present invention provide order discharge mechanism, be compared in prior art execute by physical storage device specified Operation, in the present invention, the operational order that virtual machine can be issued according to application program unloads order to generate, afterwards by void Plan machine is sent order is unloaded to main frame;Unloading order is taken after the unloading order for receiving virtual machine transmission by main frame The virtual source address of band is converted to the physical source address of data to be operated, afterwards, what main frame can be entrained according to unloading order Virtual destination address and the physical source address of above-mentioned data to be operated, treat peration data and execute assigned operation.Although so need Want virtual machine and main frame jointly to complete the implementation procedure of assigned operation, but due to main frame be the unloading life that generated according to virtual machine Make completing assigned operation, therefore, no matter the system of the current application present invention is cluster file system, Distributed sharing storage System, or other systems, main frame are capable of identify that the unloading order.Also, main frame and virtual machine belong to the one of physical machine Part, in above-mentioned implementation procedure, mainly after unloading order is received executes corresponding operating by main frame, and deposits without the need for physics Storage equipment executes corresponding operation, therefore, using implementation provided by the present invention, (can such as copy operational order is processed Shellfish or clear command) when, effectively reduce the waste of the hardware resource to physical machine.
When communication module 83 is input equipment and outut device, virtual machine 81 and main frame 82 are integrated in same memory module 84 On, then the memory module can be specially processor, when memory module 84 is memorizer, the physics involved by the embodiment of the present invention Machine can be the physical machine 90 shown in Fig. 8.
Refering to shown in Fig. 8, the physical machine 90 includes:Processor 91, input equipment 92, outut device 93, memorizer 94 with And bus 95.Wherein, processor 91, input equipment 92, outut device 93, and memorizer 94 is connected with each other by bus 95, Main frame 941 and virtual machine 942 can specifically be included in memorizer 94;Bus 95 can be Peripheral Component Interconnect standard (English: Peripheral Component Interconnect, referred to as:PCI) bus or EISA (English: Extended Industry Standard Architecture, referred to as:EISA) bus etc..The bus can be divided into address Bus, data/address bus, controlling bus etc..For ease of representing, only represented with a thick line in Fig. 8, it is not intended that only one Bus or a type of bus.
Can be realized in the way of hardware in conjunction with the step of the method described by the disclosure of invention or algorithm, also may be used By be by computing device software instruction in the way of realizing.Software instruction can be made up of corresponding software module, software mould Block can be stored on random access memory (English:Random Access Memory, referred to as:RAM), flash memory, read-only deposit Reservoir (English:Read Only Memory, referred to as:ROM), Erasable Programmable Read Only Memory EPROM (English:Erasable Programmable ROM, referred to as:EPROM), EEPROM (English:Electrically EPROM, Referred to as:EEPROM), depositor, hard disk, portable hard drive, read-only optical disc be (referred to as:CD-ROM) or well known in the art any its In the storage medium of its form.A kind of exemplary storage medium is coupled to processor, so as to enable a processor to from the storage Medium reads information, and can be to the storage medium write information.Certainly, storage medium can also be the ingredient of processor. Processor and storage medium are may be located in ASIC.In addition, the ASIC is may be located in core network interface equipment.Certainly, process Device and storage medium can also be present in core network interface equipment as discrete assembly.
It should be noted that whether above-mentioned input equipment 92, outut device 93 can be needed and other according to physical machine 90 Equipment carries out communication to determine the need for arranging.Main frame 941 shown in Fig. 8 as management level, in order to complete hardware resource Management, distribution;Assume virtual hardware platform for virtual machine 942;Realize the scheduling and isolation of virtual machine.Wherein, main frame 941 may Be monitor of virtual machine (referred to as:VMM);Additionally, VMM and privileged virtual machine coordinates sometimes, both combine composition main frame 941.Wherein, virtual hardware platform provides various hardware resources to each virtual machine for running thereon, such as provide virtual processor, Internal memory, virtual disk, Microsoft Loopback Adapter etc..Wherein, the virtual disk can respective hosts 941 a file or a logic Block device.Virtual machine 942 is then operated on virtual hardware platform of the main frame 941 for its preparation, runs one or many on main frame 941 Individual such as 942 virtual machine.Wherein, virtual machine 942 then can simulate one by software virtual machine in a physical machine Or the computer that multiple stage is virtual, and these virtual machines are operated just as real computer, can be with virtual machine 942 Installation operation system and application program, virtual machine 942 may also access Internet resources.For the application run in virtual machine 942 For program, virtual machine is like to be operated in real computer.
In the present invention, virtual machine 942, for intercepting and capturing the operational order that application program is issued, operational order is used for indicating Treat peration data and execute assigned operation;Virtual machine 942, is additionally operable to according to operational order, generates unloading order, and to main frame 941 send unloading order, and unloading order includes copy unloading order or resets unloading order;Main frame 941, for ordering unloading In virtual source address be converted to the physical source address of data to be operated, virtual source address is used for representing data to be operated in virtuality Position in the virtual disk of machine 942;Main frame 941, is additionally operable to according to the virtual destination address and number to be operated in unloading order According to physical source address, treat peration data execute assigned operation.
Additionally, virtual machine 942 can be also used for executing the function of being realized such as virtual machine in Fig. 5 and Fig. 6, main frame 941 is also Can be used for executing the function of being realized such as main frame in Fig. 5 and Fig. 6, specifically may refer to each step in said method embodiment Suddenly, will not be described here.
The physical machine that the present invention is provided, is compared in prior art and executes assigned operation by physical storage device, In the present invention, the operational order that virtual machine can be issued according to application program unloads order to generate, afterwards by virtual machine Unloading order is sent to main frame;Main frame will be unloaded entrained by order after the unloading order for receiving virtual machine transmission Virtual source address is converted to the physical source address of data to be operated, and afterwards, main frame can be according to the entrained virtuality of unloading order Destination address and the physical source address of above-mentioned data to be operated, treat peration data and execute assigned operation.Although so need void Plan machine and main frame jointly completing the implementation procedure of assigned operation, but due to main frame be the unloading order that generated according to virtual machine come Assigned operation is completed, therefore, no matter the system of the current application present invention is cluster file system, Distributed sharing storage system System, or other systems, main frame are capable of identify that the unloading order.Also, main frame and virtual machine belong to of physical machine Point, in above-mentioned implementation procedure, mainly corresponding operating is executed by main frame after unloading order is received, and without the need for physical store Equipment executes corresponding operation, therefore, using implementation provided by the present invention, can process operational order (as copied Or clear command) when, effectively reduce the waste of the hardware resource to physical machine.
Those skilled in the art it will be appreciated that in said one or multiple examples, work(described in the invention Be able to can be realized with hardware, software, firmware or their combination in any.When implemented in software, can be by these functions It is stored in computer-readable medium or is transmitted as the one or more instructions on computer-readable medium or code. Computer-readable medium includes computer-readable storage medium and communication media, and wherein communication media includes being easy to from a place to another Any medium of one place transmission computer program.Storage medium can be universal or special computer can access any Usable medium.
Above-described specific embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect Describe in detail, the be should be understood that specific embodiment that the foregoing is only the present invention is not intended to limit the present invention Protection domain, all any modification, equivalent substitution and improvements that on the basis of technical scheme, is done etc. all should It is included within protection scope of the present invention.

Claims (21)

1. a kind of order discharging method, methods described are used for physical machine, and the physical machine operation has main frame Host, on the main frame Operation has virtual machine, it is characterised in that methods described includes:
The virtual machine intercepts and captures the operational order that application program is issued, and the operational order treats peration data execution for instruction Assigned operation;
The virtual machine generates unloading order, and sends the unloading order to the main frame according to the operational order, described Unloading order includes copy unloading order or resets unloading order;
Virtual source address in the unloading order is converted to the main frame physical source address of data to be operated, the virtuality Source address is used for representing position of the data to be operated in the virtual disk of the virtual machine;
The main frame according to described unloading order in virtual destination address and the data to be operated physical source address, to institute State data to be operated and execute the assigned operation.
2. method according to claim 1, it is characterised in that when the assigned operation is copy function, described waits to grasp Include at least one data block as data, the virtual machine generates unloading order according to the operational order, and to the main frame The unloading order is sent, including:
The virtual machine generates the copy unloading order of each data block at least one data block, and sends out to the main frame Send the copy unloading order of each data block.
3. method according to claim 2, it is characterised in that intercept and capture the operation that application program issues in the virtual machine and refer to After order, methods described also includes:
The virtual machine sends to the main frame and creates instruction, carries the copy of each data block in the establishment instruction The length of data block in unloading order, the establishment instruct empty for creating in the disk file system of the purpose virtual machine File, the purpose virtual machine are operated on the main frame of the virtual machine operation, or operate in the main frame in addition to the main frame On;
The virtual machine receives the virtual destination address of the purpose virtual machine, and the virtual destination address is the ineffective law, rule, etc. The virtual address of the purpose data block of the data to be operated is distributed in part, and the length of the purpose data block is more than or equal to The length of data block in the copy unloading order of each data block.
4. method according to claim 1, it is characterised in that methods described is applied to distributed sha red memory system, institute Main frame is stated according to the virtual destination address in the unloading order and the physical source address of the data to be operated, is waited to grasp to described Make data and execute the assigned operation, including:
The virtual destination address of the data to be operated is updated to the main frame physical source address of the data to be operated;
Virtual destination address of the main frame according to the renewal, by corresponding for the physical source address of the data to be operated data The numerical value of the reference count of block adds one, and the value of the reference count is used for representing that the physical address of the data to be operated is corresponding The number of times that data block is cited.
5. method according to claim 1, it is characterised in that methods described is applied to cluster file system, the main frame According to the virtual destination address in the unloading order and the physical source address of the data to be operated, to the data to be operated The assigned operation is executed, including:
The main frame is set up between the physical source address of the virtual destination address of the data to be operated and the data to be operated Mapping relations;
The main frame is by the thing of corresponding for the physical source address of the data to be operated data block copy to the data to be operated Reason destination address;
The physical source address of the data described to be operated in the mapping relations is replaced with the data to be operated by the main frame Physics destination address.
6. the method according to claim 4 or 5, it is characterised in that the main frame is by the virtual source in the unloading order Address conversion is the physical source address of data to be operated, including:
In the case where the storage mode of the data to be operated is block storage, the main frame is by the virtuality of the data to be operated Source address is converted to the physical source address of the data to be operated;
Or,
In the case where the storage mode of the data to be operated is object storage, the main frame is by the void of the data to be operated Intend source address and be converted to object identity, the object identity is the mark of the corresponding data block of the data to be operated.
7. method according to claim 1, it is characterised in that when the unloading order for described reset unloading order when, The main frame is treated to described according to the virtual destination address in the unloading order and the physical source address of the data to be operated Peration data executes assigned operation, including:
When the virtual disk that the virtual disk is the digital simulation to be operated, the main frame is by the data to be operated Each clearing in the bit diagram of physical source address;
Or,
When the virtual disk that the virtual disk is distributed sha red memory system simulation, the main frame is by the number to be operated According to object identity release, and discharge the corresponding data block of the data to be operated;
Or,
When the virtual disk that the virtual disk is cluster file system simulation, the main frame is by the number of the data to be operated Discharge according to block;
Or,
Mapping between the physical source address of the virtual source address that there are no the data to be operated and the data to be operated During relation, corresponding for the physical source address of the data to be operated data block is write zero by the main frame.
8. a kind of order discharge mechanism, the order discharge mechanism include main frame Host and virtual machine, it is characterised in that the void Plan machine, for intercepting and capturing the operational order that application program is issued, the operational order is treated peration data execution for instruction and is specified Operation;
The virtual machine, is additionally operable to according to the operational order, generates unloading order, and sends the unloading life to the main frame Order, the unloading order include copy unloading order or reset unloading order;
The main frame, for the virtual source address in the unloading order to be converted to the physical source address of data to be operated, institute Stating virtual source address is used for representing position of the data to be operated in the virtual disk of the virtual machine;
The main frame, is additionally operable to the physical resource ground according to the virtual destination address in the unloading order and the data to be operated The data to be operated are executed the assigned operation by location.
9. device according to claim 8, it is characterised in that when the assigned operation is copy function, described waits to grasp Include at least one data block as data, order unloading according to the operational order, is generated, and send to the main frame described Unloading order aspect, the virtual machine specifically for:
Generate the copy unloading order of each data block at least one data block, and to the main frame send described each The copy unloading order of data block.
10. device according to claim 9, it is characterised in that the virtual machine, is additionally operable to send to the main frame and creates Instruction, the length for creating data block in the copy unloading order for carry in instruction each data block, the establishment Instruct for creating empty file in the disk file system of the purpose virtual machine, the purpose virtual machine operates in the void On the main frame of plan machine operation, or operate on the main frame in addition to the main frame;
The virtual machine, is additionally operable to the virtual destination address for receiving the purpose virtual machine, and the virtual destination address is The virtual address of the purpose data block of the data to be operated is distributed in the empty file, and the length of the purpose data block is big In or equal to each data block copy unloading order in data block length.
11. devices according to claim 8, it is characterised in that described device is applied to distributed sha red memory system, According to the virtual destination address in the unloading order and the physical source address of the data to be operated, to the data to be operated Execute the aspect of the assigned operation, the main frame specifically for:
The physical source address that the virtual destination address of the data to be operated is updated to the data to be operated;
According to the virtual destination address of the renewal, by the reference of corresponding for the physical source address of the data to be operated data block The numerical value of counting adds one, and the value of the reference count is used for representing the corresponding data block quilt of the physical address of the data to be operated The number of times of reference.
12. devices according to claim 8, it is characterised in that described device is applied to cluster file system, according to institute The physical source address of the virtual destination address and the data to be operated unloaded in order is stated, institute is executed to the data to be operated State the aspect of assigned operation, the main frame specifically for:
The mapping that sets up between the virtual destination address of the data to be operated and the physical source address of the data to be operated is closed System;
Physics destination by corresponding for the physical source address of the data to be operated data block copy to the data to be operated Location;
The physics mesh that the physical source address of the data described to be operated in the mapping relations is replaced with the data to be operated Address.
13. devices according to claim 11 or 12, it is characterised in that the virtual source address in the unloading is ordered Be converted to the aspect of the physical source address of data to be operated, the main frame specifically for:
In the case where the storage mode of the data to be operated is block storage, the virtual source address of the data to be operated is turned It is changed to the physical source address of the data to be operated;
Or,
In the case where the storage mode of the data to be operated is object storage, by the virtual source address of the data to be operated Object identity is converted to, the object identity is the mark of the corresponding data block of the data to be operated.
14. devices according to claim 8, it is characterised in that when the unloading order unloads order for the clearing, In the physical source address according to the virtual destination address in the unloading order and the data to be operated, to the number to be operated According to execute assigned operation aspect, the main frame specifically for:
When the virtual disk that the virtual disk is the digital simulation to be operated, by the physical resource ground of the data to be operated Each clearing in the bit diagram of location;
Or,
When the virtual disk that the virtual disk is distributed sha red memory system simulation, by the object of the data to be operated Mark release, and discharge the corresponding data block of the data to be operated;
Or,
When the virtual disk that the virtual disk is cluster file system simulation, the data block of the data to be operated is released Put;
Or,
Mapping between the physical source address of the virtual source address that there are no the data to be operated and the data to be operated During relation, corresponding for the physical source address of the data to be operated data block is write zero.
A kind of 15. physical machines, the physical machine include hardware layer, operate in main frame Host and virtuality on the hardware layer Machine, it is characterised in that the virtual machine, for intercepting and capturing the operational order that application program is issued, the operational order is used for indicating Treat peration data and execute assigned operation;
The virtual machine, is additionally operable to according to the operational order, generates unloading order, and sends the unloading life to the main frame Order, the unloading order include copy unloading order or reset unloading order;
The main frame, for the virtual source address in the unloading order to be converted to the physical source address of data to be operated, institute Stating virtual source address is used for representing position of the data to be operated in the virtual disk of the virtual machine;
The main frame, is additionally operable to the physical resource ground according to the virtual destination address in the unloading order and the data to be operated The data to be operated are executed the assigned operation by location.
16. physical machines according to claim 15, it is characterised in that when the assigned operation is copy function, described Data to be operated include at least one data block, order unloading according to the operational order, is generated, and send to the main frame Described unloading order aspect, the virtual machine specifically for:
Generate the copy unloading order of each data block at least one data block, and to the main frame send described each The copy unloading order of data block.
17. physical machines according to claim 16, it is characterised in that the virtual machine, are additionally operable to send to the main frame Instruction is created, the length for creating data block in the copy unloading order for carry in instruction each data block is described Creating instruction is used for creating empty file in the disk file system of the purpose virtual machine, and the purpose virtual machine operates in institute State on the main frame of virtual machine operation, or operate on the main frame in addition to the main frame;
The virtual machine, is additionally operable to the virtual destination address for receiving the purpose virtual machine, and the virtual destination address is The virtual address of the purpose data block of the data to be operated is distributed in the empty file, and the length of the purpose data block is big In or equal to each data block copy unloading order in data block length.
18. physical machines according to claim 15, it is characterised in that described device is applied to Distributed sharing storage system System, in the physical source address according to the virtual destination address in the unloading order and the data to be operated, waits to grasp to described Make the aspect that data execute the assigned operation, the main frame specifically for:
The physical source address that the virtual destination address of the data to be operated is updated to the data to be operated;
According to the virtual destination address of the renewal, by the reference of corresponding for the physical source address of the data to be operated data block The numerical value of counting adds one, and the value of the reference count is used for representing the corresponding data block quilt of the physical address of the data to be operated The number of times of reference.
19. physical machines according to claim 15, it is characterised in that described device is applied to cluster file system, in root According to the virtual destination address in the unloading order and the physical source address of the data to be operated, the data to be operated are held The aspect of the row assigned operation, the main frame specifically for:
The mapping that sets up between the virtual destination address of the data to be operated and the physical source address of the data to be operated is closed System;
Physics destination by corresponding for the physical source address of the data to be operated data block copy to the data to be operated Location;
The physics mesh that the physical source address of the data described to be operated in the mapping relations is replaced with the data to be operated Address.
20. physical machines according to claim 18 or 19, it is characterised in that the virtual source ground in the unloading is ordered Location is converted to the aspect of the physical source address of data to be operated, the main frame specifically for:
In the case where the storage mode of the data to be operated is block storage, the virtual source address of the data to be operated is turned It is changed to the physical source address of the data to be operated;
Or,
In the case where the storage mode of the data to be operated is object storage, by the virtual source address of the data to be operated Object identity is converted to, the object identity is the mark of the corresponding data block of the data to be operated.
21. physical machines according to claim 15, it is characterised in that when the unloading order resets unloading order for described When, in the physical source address according to the virtual destination address in the unloading order and the data to be operated, wait to grasp to described Make data execute assigned operation aspect, the main frame specifically for:
When the virtual disk that the virtual disk is the digital simulation to be operated, by the physical resource ground of the data to be operated Each clearing in the bit diagram of location;
Or,
When the virtual disk that the virtual disk is distributed sha red memory system simulation, by the object of the data to be operated Mark release, and discharge the corresponding data block of the data to be operated;
Or,
When the virtual disk that the virtual disk is cluster file system simulation, the data block of the data to be operated is released Put;
Or,
Mapping between the physical source address of the virtual source address that there are no the data to be operated and the data to be operated During relation, corresponding for the physical source address of the data to be operated data block is write zero.
CN201610853875.5A 2016-09-26 2016-09-26 A kind of order discharging method, device and physical machine Active CN106502721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610853875.5A CN106502721B (en) 2016-09-26 2016-09-26 A kind of order discharging method, device and physical machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610853875.5A CN106502721B (en) 2016-09-26 2016-09-26 A kind of order discharging method, device and physical machine

Publications (2)

Publication Number Publication Date
CN106502721A true CN106502721A (en) 2017-03-15
CN106502721B CN106502721B (en) 2019-11-15

Family

ID=58290559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610853875.5A Active CN106502721B (en) 2016-09-26 2016-09-26 A kind of order discharging method, device and physical machine

Country Status (1)

Country Link
CN (1) CN106502721B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729049A (en) * 2017-09-13 2018-02-23 深信服科技股份有限公司 Instruct conversion method, equipment and computer-readable recording medium
CN112015350A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Method, device and medium for unloading data disk of virtual machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487418A (en) * 2002-09-05 2004-04-07 �Ҵ���˾ Far-end divect memory access invocating memory management unloading of network adapter
CN101359315A (en) * 2007-07-31 2009-02-04 英特尔公司 Offloading input/output (I/O) virtualization operations to a processor
CN101751274A (en) * 2008-12-18 2010-06-23 联想(北京)有限公司 Virtual machine system and unloading method of universal serial bus device thereof
CN102473139A (en) * 2009-07-24 2012-05-23 超威半导体公司 I/O memory management unit including multilevel address translation for I/O and computation offload
CN102652305A (en) * 2009-12-17 2012-08-29 微软公司 Virtual storage target offload techniques

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1487418A (en) * 2002-09-05 2004-04-07 �Ҵ���˾ Far-end divect memory access invocating memory management unloading of network adapter
CN101359315A (en) * 2007-07-31 2009-02-04 英特尔公司 Offloading input/output (I/O) virtualization operations to a processor
CN101751274A (en) * 2008-12-18 2010-06-23 联想(北京)有限公司 Virtual machine system and unloading method of universal serial bus device thereof
CN102473139A (en) * 2009-07-24 2012-05-23 超威半导体公司 I/O memory management unit including multilevel address translation for I/O and computation offload
CN102652305A (en) * 2009-12-17 2012-08-29 微软公司 Virtual storage target offload techniques

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729049A (en) * 2017-09-13 2018-02-23 深信服科技股份有限公司 Instruct conversion method, equipment and computer-readable recording medium
CN112015350A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Method, device and medium for unloading data disk of virtual machine
CN112015350B (en) * 2020-08-28 2022-03-22 北京浪潮数据技术有限公司 Method, device and medium for unloading data disk of virtual machine

Also Published As

Publication number Publication date
CN106502721B (en) 2019-11-15

Similar Documents

Publication Publication Date Title
US9588787B2 (en) Runtime virtual process creation for load sharing
CN101842784B (en) Hardware device interface supporting transaction authentication
JP5689526B2 (en) Resource affinity through dynamic reconfiguration of multiqueue network adapters
CN102262557B (en) Method for constructing virtual machine monitor by bus architecture and performance service framework
US8151265B2 (en) Apparatus for and method for real-time optimization of virtual machine input/output performance
DE112020006859T5 (en) PRESERVATION OF STORE NAMESPACE IDENTIFIERS FOR HOT MIGRATION OF VIRTUALIZED EXECUTION ENVIRONMENTS
EP3985504B1 (en) Virtual machine migration
US20160378554A1 (en) Parallel and Distributed Computing Using Multiple Virtual Machines
US8413143B2 (en) Dynamic network adapter queue pair allocation
US10866814B2 (en) Efficient instantiation of encrypted guests
KR20100081322A (en) Methodology for secure application partitioning enablement
CN108469986A (en) A kind of data migration method and device
CN105991651B (en) Network interface device with long-range storage control
WO2013176864A2 (en) Virtual machine exclusive caching
EP2243254B1 (en) Peer-to-peer streaming and api services for plural applications
WO2021018267A1 (en) Live migration method for virtual machine and communication device
WO2022143714A1 (en) Server system, and virtual machine creation method and apparatus
CN106815067A (en) The online moving method of virtual machine, device with I/O virtualizations
CN106502721A (en) A kind of order discharging method, device and physical machine
CN103763403A (en) Message flow control method, message flow control related device and computational node
Li et al. A novel disk I/O scheduling framework of virtualized storage system
CN104598297B (en) virtual machine management method and device
RU2702053C1 (en) Method of reducing load on scanning subsystem by deduplicating file scanning
CN103885813B (en) Packet capturing method in virtual machine environment
US10241821B2 (en) Interrupt generated random number generator states

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant