WO2021139443A1 - 数据访问控制方法及装置、数据访问设备及系统 - Google Patents

数据访问控制方法及装置、数据访问设备及系统 Download PDF

Info

Publication number
WO2021139443A1
WO2021139443A1 PCT/CN2020/132439 CN2020132439W WO2021139443A1 WO 2021139443 A1 WO2021139443 A1 WO 2021139443A1 CN 2020132439 W CN2020132439 W CN 2020132439W WO 2021139443 A1 WO2021139443 A1 WO 2021139443A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data access
ecc
storage unit
physical address
Prior art date
Application number
PCT/CN2020/132439
Other languages
English (en)
French (fr)
Inventor
马凌
何昌华
Original Assignee
支付宝(杭州)信息技术有限公司
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 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021139443A1 publication Critical patent/WO2021139443A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1012Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error

Definitions

  • the embodiments of the present specification generally relate to the field of data processing, and more specifically, to a data access control method and a data access control device for realizing memory verification optimization, a data access device having the access control device, and a data access system.
  • the data required by the application is stored in a storage unit such as a memory.
  • the application When working, the application will access the storage unit to read the required data for relevant application processing, and store the result data obtained after the application processing in the storage unit.
  • the storage unit is an electronic device, and memory errors may occur during operation. For application operations with high stability requirements, this memory error will cause incorrect data used by the application, which will result in incorrect processing results of the application.
  • Memory errors can be divided into hard errors and soft errors. Hard errors are errors caused by hardware damage or defects. Soft errors occur randomly, such as errors caused by factors such as sudden electronic interference near the memory.
  • ECC Error Checking and Correcting
  • the ECC check code is stored in the extra bits on the data bits.
  • the corresponding ECC check code is also saved in the memory.
  • the memory controller compares the saved ECC check code with the ECC check code generated when the data is read. If the two check codes are not the same, then decode to determine which bit in the data is incorrect. Then, the memory controller discards the error bit and returns the correct data.
  • ECC verification processing requires processing resources and processing time.
  • the application may include multiple data access processes, and each data access process involves different data processing stages, and the data processing methods in these data processing stages will also be different.
  • the embodiments of this specification provide a data access control method and a data access control device.
  • the data access control method and the data access device it is possible to control whether to perform ECC verification processing according to the application's integrity requirements for the used data, thereby not performing ECC verification for data access operations that do not need to perform ECC verification processing Processing, thereby reducing the system power consumption during data access operations, and improving the throughput of data access processing.
  • a data access control method including: acquiring from an instruction execution device a data access command and ECC attribute information of an application for a data storage unit, the data access command including a physical address to be accessed
  • the ECC attribute is used to indicate whether the ECC check needs to be performed when performing a data access operation; when the ECC attribute information indicates that the ECC check needs to be performed, execute the data storage unit according to the physical address
  • For data access operations with ECC verification when the ECC attribute information indicates that the ECC verification does not need to be performed, perform the data access operation without ECC verification on the data storage unit according to the physical address, wherein
  • the physical address is obtained by converting the virtual address in the received data access instruction at the instruction execution device.
  • the attribute value of the ECC attribute information is determined according to the data integrity requirements of the application during data processing.
  • the ECC attribute information is set in the page attribute field of the physical page where the physical address is located.
  • the ECC attribute information is set in the data access instruction.
  • the data access command includes a data write command
  • obtaining the data access command and ECC attribute information of the application for the data storage unit from the instruction execution device includes: obtaining the application target from the instruction execution device
  • the data writing command, ECC attribute information, and writing data of the data storage unit, and performing the data access operation with ECC check on the data storage unit according to the physical address includes: using the writing data to generate an ECC check Verification code; and sending the data write command, write data, and the ECC check code to the data storage unit, and the data storage unit checks the ECC check code according to the data write command
  • the data access operation includes: sending the data write command and the write data to the data storage unit, and the data storage unit writes the write data to the physical storage unit according to the data write command. address.
  • the data access command may include a data read command
  • performing a data access operation with ECC check on the data storage unit according to the physical address may include: The data read command is sent to the data storage unit, and the data storage unit obtains the read data and the associated ECC check code according to the physical address; receives the read data and the associated ECC check code from the data storage unit The ECC check code; perform ECC check processing based on the read data and the ECC check code; send the read data after the ECC check processing to the instruction execution device, and according to the physical
  • Performing the data access operation without ECC check on the data storage unit by an address may include: sending the data read command to the data storage unit, and the data storage unit obtains the read data according to the physical address ; Receive the read data from the data storage unit; send the read data to the instruction execution device.
  • the application may include a machine learning application.
  • a data access control device including: an access command acquisition unit, which acquires from the instruction execution device a data access command and ECC attribute information of an application for a data storage unit, the data access command It includes the physical address to be accessed, the ECC attribute is used to indicate whether ECC verification needs to be performed when performing a data access operation; the data access unit, when the ECC attribute information indicates that the ECC verification needs to be performed, according to the Physical address to perform data access operations with ECC verification on the data storage unit, and when the ECC attribute information indicates that the ECC verification does not need to be performed, perform the data storage unit on the data storage unit according to the physical address A data access operation without ECC verification, wherein the physical address is obtained by converting a virtual address in the received data access instruction at the instruction execution device.
  • the ECC attribute information is set in the page attribute field of the physical page where the physical address is located.
  • the ECC attribute information is set in the data access instruction.
  • a data access device including: an instruction execution device that converts a virtual address in a data access instruction into a physical address, and obtains ECC attribute information; and the data access as described above Control device.
  • a data access system includes: the data access device as described above; and a data storage unit.
  • an electronic device including: one or more processors, and a memory coupled with the one or more processors, the memory storing instructions, when the instructions When executed by the one or more processors, the one or more processors are caused to execute the data access control method described above.
  • a machine-readable storage medium which stores executable instructions that, when executed, cause the machine to execute the data access control method as described above.
  • Figure 1 shows a block diagram of a data access system according to an embodiment of the present specification
  • Figure 2 shows a schematic diagram of a process for converting a virtual address into a physical address according to an embodiment of the present specification
  • Fig. 3 shows a schematic diagram of an example of a physical page page table entry according to an embodiment of the present specification
  • Figure 4 shows a flowchart of a data access method according to an embodiment of the present specification
  • Fig. 5 shows an exemplary schematic diagram of a data writing method according to an embodiment of the present specification
  • Fig. 6 shows an exemplary schematic diagram of a data reading method according to an embodiment of the present specification
  • Figure 7 shows a block diagram of a data access device according to an embodiment of the present specification.
  • Fig. 8 shows a block diagram of an electronic device for implementing data access according to an embodiment of the present specification.
  • the term “including” and its variations mean open terms, meaning “including but not limited to”.
  • the term “based on” means “based at least in part on.”
  • the terms “one embodiment” and “an embodiment” mean “at least one embodiment.”
  • the term “another embodiment” means “at least one other embodiment.”
  • the terms “first”, “second”, etc. may refer to different or the same objects. Other definitions can be included below, whether explicit or implicit. Unless clearly indicated in the context, the definition of a term is consistent throughout the specification.
  • Fig. 1 shows a schematic block diagram of a data access system 1 according to an embodiment of the present specification.
  • the data access system 1 includes an instruction execution device 110, a data access control device 120 and a data storage unit 130.
  • the instruction execution device 110 is used to execute data access instructions.
  • the instruction execution device 110 can be implemented by any device, device, unit or module with instruction execution. For example, it can use a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), and digital signal processing. Realization of DSP (Digital Signal Processing), FPGA chip, etc.
  • the data access instruction may include a data write instruction and a data read instruction.
  • An example of the data write instruction may be "mov r1%, (%r2)", for example.
  • the data write instruction indicates "store the contents of register r1 in the cache/memory pointed to by register r2".
  • An example of the data read instruction may be "mov(%r2), r1%", for example.
  • the data read instruction indicates "read the contents stored in the buffer/memory pointed to by register r2 to register r1".
  • the virtual address is stored in the register r2, for example, 0x010101AF5518.
  • the instruction execution device 110 When the instruction execution device 110 executes the data access instruction, the instruction execution device 110 converts the virtual address in the data access instruction into the physical address of the physical page where the data to be accessed is located, that is, the physical address in the physical address space.
  • FIG. 2 shows a schematic diagram of an example process for converting a virtual address into a physical address according to an embodiment of the present specification.
  • Figure 2 shows an example architecture of a four-level page management architecture. The four levels shown in Figure 2 are: page global directory PGD (ie, page P4 in Figure 2), page upper-level directory PUD (ie, page P3 in Figure 2), page intermediate directory PMD (ie, Figure 2 Page P2 in Figure 2) and page table PT (ie, page P1 in Figure 2).
  • page global directory PGD ie, page P4 in Figure 2
  • page upper-level directory PUD ie, page P3 in Figure 2
  • page intermediate directory PMD ie, Figure 2 Page P2 in Figure 2
  • page table PT ie, page P1 in Figure 2
  • the first part includes 39 to 47 bits (page global catalog index), that is, 0000 0001 0.
  • the second part includes 30 to 38 digits (the upper-level directory index of the page), that is, 000 0001 00.
  • the third part contains 21 to 29 digits (index of page middle directory), that is, 00 0001 101.
  • the fourth part includes 12 to 20 bits (page table entry index), that is, 0 1111 0101.
  • the fifth part includes 0-11 bits (offset), that is, 0101 0001 1000.
  • offset 0x518.
  • the physical address is taken from the current CR3 register, and the physical address points to the page directory page base address of the process, so that the page global directory page base address can be obtained. Assuming that the physical address in the CR3 register is 0xAA0E5000, the page base address of the page global directory is 0xAA0E5000. The operating system will load this address into the CR3 register when scheduling the process.
  • the instruction execution device 110 may also obtain the ECC attribute information of the corresponding data access operation.
  • the ECC attribute information is used to indicate whether ECC verification needs to be performed when performing a data access operation on the data storage unit 130.
  • ECC attribute information can be set according to the data integrity requirements of the application during data processing.
  • the “application” may include, for example, applications based on machine learning. Machine learning applications need to use a lot of data in the execution process, and in some data processing stages, the application uses probability statistics to process data. Because the use of probability statistics to perform data processing has fault tolerance, the data is being processed. When accessing, there is no need to consider the correctness of each bit in the acquired data. In other words, in this case, a data access operation without ECC verification can be performed.
  • the ECC attribute information may be set in the page attribute field of the physical page where the data to be accessed is located.
  • Fig. 3 shows a schematic diagram of an example of a page table entry of a physical page according to an embodiment of the present specification. Shown in FIG. 3 is an example of a page table entry of a 32-bit physical page.
  • bits 0-11 are page attribute fields
  • bits 12-31 are page address bits.
  • bits 0 to 8 have been used
  • bits 9 to 11 are reserved bits that can be used to store ECC attribute information.
  • the ECC attribute information can be represented by the ECC flag. When the value of the ECC flag is "1", it indicates that the ECC check is required for data access, and when the value of the ECC flag is "0", it indicates that the data access is being performed. There is no need to perform ECC verification.
  • the ECC attribute information may be set in the data access instruction.
  • the data write instruction indicates "store the content of register r1 in the cache/memory pointed to by register r2, and at the same time explicitly instruct the data access control device not to perform ECC verification when writing data”.
  • the data read instruction "movnecc(r2%),%r1” can be set.
  • the data read instruction indicates "read the contents of the buffer/memory pointed to by register r2 into register r1, and at the same time explicitly instruct the data access control device not to perform ECC verification when reading data”.
  • the instruction execution device 110 After obtaining the physical address and ECC attribute information as described above, the instruction execution device 110 sends a data access command and ECC attribute information to the data access control device 120, and the data access command includes the converted physical address.
  • the data access command can be generated based on the converted physical address and the data access command.
  • the data access control device 120 After receiving the data access command and the ECC attribute information, the data access control device 120 performs data access to the data storage unit 130 according to the ECC attribute information.
  • the processing procedure of the data access control device 120 will be described in detail below with reference to FIG. 4.
  • the data storage unit 130 may be any type of data storage unit or module, such as a memory, a cache, and a solid-state storage unit such as an SSD.
  • the data access control device 120 may also be referred to as a cache/memory controller.
  • ECC attribute information may also be included in the data access command.
  • FIG. 4 shows a flowchart of a data access method 400 according to an embodiment of the present specification.
  • the instruction execution device 110 it is monitored whether a data access instruction is received. If it is not received, continue monitoring. If a data access instruction is received, at 420, the virtual address in the data access instruction is converted to a physical address, and ECC attribute information is obtained.
  • the conversion process from the virtual address to the physical address can refer to the address conversion operation described above with reference to FIG. 2.
  • the ECC attribute information can be extracted from the page attribute field of the physical page where the physical address is located, or can be obtained by analyzing the data access instruction.
  • the instruction execution device 110 sends a data access command and ECC attribute information to the data access control device 120.
  • the data access command includes the converted physical address.
  • the instruction execution device 110 also sends the write data to the data access control device 120.
  • the data access control device 120 After receiving the data access command, at 440, the data access control device 120 determines, according to the ECC attribute information, whether it is necessary to perform ECC verification when performing data access to the data storage unit 130.
  • the data access control device 120 performs a data access operation without ECC verification on the data storage unit 130 according to the physical address.
  • the data access control device 120 When the ECC attribute information indicates that ECC verification needs to be performed, at 460, the data access control device 120 performs a data access operation with ECC verification on the data storage unit 130 according to the physical address.
  • the specific data access operation of the data access control device 120 will be described with reference to FIG. 5 and FIG. 6 for the data writing operation and the data reading operation, respectively.
  • FIG. 5 shows an exemplary schematic diagram of a data writing method 500 according to an embodiment of the present specification.
  • the instruction execution device 110 it is monitored whether a data writing instruction is received. If it is not received, continue monitoring. If a data write instruction is received, at 520, the virtual address in the data write instruction is converted to a physical address. In addition, the instruction execution device 110 also obtains ECC attribute information.
  • the instruction execution device 110 sends a data write command, ECC attribute information, and write data to the data access control device 120, where the data write command includes the converted physical address.
  • the data access control device 120 After receiving the data write command, at 540, the data access control device 120 determines, according to the ECC attribute information, whether ECC verification needs to be performed when writing the write data to the data storage unit 130.
  • the data access control device 120 sends the data write command and the write data to the data storage unit 130. Subsequently, at 560, the data storage unit 130 writes the write data into the physical address according to the data write command.
  • the data access control device 120 uses the written data to generate an ECC verification code. Then, at 580, the data access control device 120 sends the data write command, the write data, and the ECC check code to the data storage unit 130.
  • the data storage unit 130 writes the write data to the physical address according to the data write command.
  • FIG. 6 shows an exemplary schematic diagram of a data reading method 600 according to an embodiment of the present specification.
  • the instruction execution device 110 it is monitored whether a data read instruction is received. If it is not received, continue monitoring. If a data read instruction is received, at 602, the virtual address in the data read instruction is converted to a physical address. In addition, the instruction execution device 110 also obtains ECC attribute information.
  • the instruction execution device 110 sends a data read command and ECC attribute information to the data access control device 120, where the data read command includes the converted physical address.
  • the data access control device 120 After receiving the data read command and ECC attribute information, at 604, the data access control device 120 sends the data read command and ECC attribute information to the data storage unit.
  • the data storage unit 130 determines whether ECC verification needs to be performed according to the ECC attribute information. When it is judged that it is not necessary to perform ECC verification, at 606, the data storage unit 130 reads the data at the physical address (ie, reads the data), and at 607, sends the read data to the data access control device 120. In 608, the data access control device 120 returns the obtained data to the instruction execution device 110 to perform subsequent data processing.
  • the data storage unit 130 When it is determined that the ECC verification needs to be performed, at 609, the data storage unit 130 reads the data at the processing address and the associated ECC check code, and at 610, the data storage unit 130 stores the read data and the ECC The check code is sent to the data access control device 120.
  • the data access control device 120 After receiving the read data and the ECC check code, in 611, the data access control device 120 performs ECC check processing based on the read data and the ECC check code. Specifically, the data access control device 120 generates an ECC check code according to the received read data, and then compares the generated ECC check code with the received ECC check code. If the two check codes are not the same, then decode to determine which bits in the data are incorrect.
  • the data access control device 120 discards the error bit, and returns the correct data to the instruction execution device 120 to perform subsequent data processing.
  • the ECC attribute information is set according to the data integrity requirements of the application when the data access of the application is executed, and the data access control device controls the execution of the data storage unit without ECC according to the set ECC attribute information.
  • Checked data access or data access with ECC check so that ECC check processing can not be performed when data access operations that do not need to perform ECC check processing, thereby reducing system power consumption during data access operations, and increasing data Access processing throughput.
  • FIG. 7 shows a block diagram of a data access control device 700 according to an embodiment of the present specification.
  • the data access control device 700 includes an access command acquisition unit 710 and a data access unit 720.
  • the access command acquisition unit 710 is configured to acquire the data access command and ECC attribute information of the application for the data storage unit from the instruction execution device 110, the data access command includes the physical address to be accessed, and the ECC attribute is used to indicate that the data is in progress. Whether to perform ECC verification during access operation.
  • the operation of the access command obtaining unit 710 may refer to the operation of the block 410 described above with reference to FIG. 4.
  • the data access unit 720 is configured to perform a data access operation with ECC verification on the data storage unit according to the physical address when the ECC attribute information indicates that ECC verification needs to be performed, and when the ECC attribute information indicates that the ECC verification does not need to be performed During verification, a data access operation without ECC verification is performed on the data storage unit according to the physical address.
  • the operation of the data access unit 720 may refer to the operations of the blocks 450 and 460 described above with reference to FIG. 4.
  • the above data access control device can be implemented by hardware, or by software or a combination of hardware and software.
  • FIG. 8 shows a structural block diagram of an electronic device 800 for implementing data access control according to an embodiment of the present specification.
  • the electronic device 800 may include at least one processor 810, a memory (for example, a non-volatile memory) 820, a memory 830, a communication interface 840, and an internal bus 860, and at least one processor 810, a memory 820, The memory 830 and the communication interface 840 are connected together via a bus 860.
  • the at least one processor 810 executes at least one computer-readable instruction (that is, the above-mentioned element implemented in the form of software) stored or encoded in a computer-readable storage medium.
  • computer-executable instructions are stored in the memory, which, when executed, cause at least one processor 810 to: obtain data access commands and ECC attribute information of the application for the data storage unit from the instruction execution device, and the data access The command includes the physical address to be accessed, the ECC attribute is used to indicate whether the ECC check needs to be performed during data access operations; when the ECC attribute information indicates that the ECC check needs to be performed, the ECC check is performed according to the physical address.
  • the physical address is obtained by converting the virtual address in the received data access instruction at the instruction execution device.
  • a program product such as a non-transitory machine-readable medium.
  • the non-transitory machine-readable medium may have instructions (that is, the above-mentioned elements implemented in the form of software), which, when executed by a machine, cause the machine to execute the various embodiments described in conjunction with FIGS. 1-7 in the various embodiments of this specification. Operation and function.
  • a system or device equipped with a readable storage medium may be provided, and the software program code for realizing the function of any one of the above-mentioned embodiments is stored on the readable storage medium, and the computer or device of the system or device The processor reads and executes the instructions stored in the readable storage medium.
  • the program code itself read from the readable medium can implement the function of any one of the above embodiments, so the machine readable code and the readable storage medium storing the machine readable code constitute this specification a part of.
  • Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, Volatile memory card and ROM.
  • the program code can be downloaded from the server computer or the cloud via the communication network.
  • the device structure described in the foregoing embodiments may be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or may be implemented by multiple physical entities. Some components in independent devices are implemented together.
  • the hardware unit or module can be implemented mechanically or electrically.
  • a hardware unit, module, or processor may include a permanent dedicated circuit or logic (such as a dedicated processor, FPGA or ASIC) to complete the corresponding operation.
  • the hardware unit or processor may also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which may be temporarily set by software to complete corresponding operations.
  • the specific implementation method mechanical method, or dedicated permanent circuit, or temporarily set circuit

Abstract

一种数据访问控制方法及装置。在该方法中,从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址。数据访问控制装置根据ECC属性信息确定在进行数据访问时是否执行ECC校验。在ECC属性信息指示需要执行ECC校验时,数据访问控制装置根据物理地址来对数据存储单元执行具有ECC校验的数据访问操作。在ECC属性信息指示不需要执行ECC校验时,数据访问控制装置根据物理地址来对数据存储单元执行不具有ECC校验的数据访问操作。利用该方法,可以降低数据访问操作时的系统功耗,并且提升数据访问处理的吞吐量。

Description

数据访问控制方法及装置、数据访问设备及系统 技术领域
本说明书的实施例通常涉及数据处理领域,更具体地,涉及实现内存校验优化的数据访问控制方法及数据访问控制装置、具有该访问控制装置的数据访问设备以及数据访问系统。
背景技术
应用所需要的数据存储在例如内存的存储单元中。在进行工作时,应用会访问存储单元来读取所需数据进行相关应用处理,以及将经过应用处理后得到的结果数据存储到存储单元中。
存储单元是一种电子器件,在工作过程中可能会出现内存错误。对于稳定性要求高的应用操作,这种内存错误会造成应用所使用的数据不正确,从而导致应用的处理结果不正确。内存错误可以分为硬错误和软错误。硬错误是由于硬件的损害或缺陷造成的错误。软错误是随机出现的,例如在内存附近突然出现电子干扰等因素而造成的错误。
为了解决上述软错误,提出了ECC(Error Checking and Correcting,错误检查和纠正)技术。利用ECC技术,在数据比特上的额外比特处存储ECC校验码。当数据被写入内存时,相应的ECC校验码也被保存到内存中。当重新读取刚才存储的数据时,内存控制器将所保存的ECC校验码和读取数据时产生的ECC校验码进行比较。如果两个校验码不相同,则进行解码,以确定数据中的哪一比特不正确。然后,内存控制器丢弃错误比特,并且返回正确的数据。
然而,ECC校验处理需要占用处理资源以及花费处理时间。对于一些应用,例如,涉及机器学习的应用,应用可以包括多次数据访问过程,每次数据访问过程涉及不同的数据处理阶段,这些数据处理阶段的数据处理方式也会不同。此外,在这些数据处理阶段中,可能会存在部分数据处理阶段的数据处理方式无需每个数据比特的正确性,从而可以不执行ECC校验处理。在这种情况下,如何高效地执行数据访问处理,成为亟待解决的问题。
发明内容
鉴于上述问题,本说明书的实施例提供一种数据访问控制方法及数据访问控制装置。利用该数据访问控制方法及数据访问装置,能够根据应用针对所使用数据的完整性要求来控制是否执行ECC校验处理,由此针对无需执行ECC校验处理的数据访问操作时不执行ECC校验处理,从而降低数据访问操作时的系统功耗,并且提升数据访问处理的吞吐量。
根据本说明书的实施例的一个方面,提供一种数据访问控制方法,包括:从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验;在所述ECC属性信息指示需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,在所述ECC属性信息指示不需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作,其中,所述物理地址通过在所述指令执行装置处对所接收的数据访问指令中的虚拟地址进行转换而得到。
可选地,在上述方面的一个示例中,所述ECC属性信息的属性值根据所述应用在进行数据处理时的数据完整性要求确定。
可选地,在上述方面的一个示例中,所述ECC属性信息被设置在所述物理地址所在物理页的页面属性字段中。
可选地,在上述方面的一个示例中,所述ECC属性信息被设置在所述数据访问指令中。
可选地,在上述方面的一个示例中,所述数据访问命令包括数据写入命令,从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息包括:从指令执行装置获取应用针对数据存储单元的数据写入命令、ECC属性信息以及写入数据,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作包括:使用所述写入数据来生成ECC校验码;以及将所述数据写入命令、写入数据以及所述ECC校验码发送给所述数据存储单元,所述数据存储单元根据所述数据写入命令,对所述ECC校验码与所述写入数据执行相关联的写入操作,其中,所述写入数据被写入到所述物理地址,以及根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作包括:将所述数据写入命令和所述写入数据发送给所述数据存储单元,所述数 据存储单元根据所述数据写入命令,将所述写入数据写入所述物理地址。
可选地,在上述方面的一个示例中,所述数据访问命令可以包括数据读取命令,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作可以包括:将所述数据读取命令发送给所述数据存储单元,所述数据存储单元根据所述物理地址获取读出数据以及相关联的ECC校验码;从所述数据存储单元接收所述读出数据以及所述ECC校验码;基于所述读出数据以及所述ECC校验码,进行ECC校验处理;将经过ECC校验处理后的读出数据发送给所述指令执行装置,以及根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作可以包括:将所述数据读取命令发送给所述数据存储单元,所述数据存储单元根据所述物理地址获取读出数据;从所述数据存储单元接收所述读出数据;将所述读出数据发送给所述指令执行装置。
可选地,在上述方面的一个示例中,所述应用可以包括机器学习类应用。
根据本说明书的实施例的另一方面,提供一种数据访问控制装置,包括:访问命令获取单元,从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验;数据访问单元,在所述ECC属性信息指示需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,以及在所述ECC属性信息指示不需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作,其中,所述物理地址通过在所述指令执行装置处对所接收的数据访问指令中的虚拟地址进行转换而得到。
可选地,在上述方面的一个示例中,所述ECC属性信息被设置在所述物理地址所在物理页的页面属性字段中。
可选地,在上述方面的一个示例中,所述ECC属性信息被设置在所述数据访问指令中。
根据本说明书的实施例的另一方面,提供一种数据访问设备,包括:指令执行装置,将数据访问指令中的虚拟地址转换为物理地址,以及获取ECC属性信息;以及如上所述的数据访问控制装置。
根据本说明书的实施例的另一方面,一种数据访问系统,包括:如上所述的数据访问设备;以及数据存储单元。
根据本说明书的实施例的另一方面,提供一种电子设备,包括:一个或多个处理器,以及与所述一个或多个处理器耦合的存储器,所述存储器存储指令,当所述指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如上所述的数据访问控制方法。
根据本说明书的实施例的另一方面,提供一种机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如上所述的数据访问控制方法。
附图说明
通过参照下面的附图,可以实现对于本说明书的实施例内容的本质和优点的进一步理解。在附图中,类似组件或特征可以具有相同的附图标记。
图1示出了根据本说明书的实施例的数据访问系统的方框示意图;
图2示出了根据本说明书的实施例的用于将虚拟地址转换为物理地址的过程的示意图;
图3示出了根据本说明书的实施例的物理页页表项的一个示例的示意图;
图4示出了根据本说明书的实施例的数据访问方法的流程图;
图5示出了根据本说明书的实施例的数据写入方法的示例示意图;
图6示出了根据本说明书的实施例的数据读取方法的示例示意图;
图7示出了根据本说明书的实施例的数据访问装置的方框图;和
图8示出了根据本说明书的实施例的用于实现数据访问的电子设备的方框图。
具体实施方式
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本说明书的实施例内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。例如,所描述的方法可以按照与所描述的顺序不同的顺序来执行,以及各个步骤可以被添加、省略或者组合。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。术语“第一”、“第二”等可以指代不同的或相同的对象。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。
图1示出了根据本说明书的实施例的数据访问系统1的方框示意图。如图1所示,数据访问系统1包括指令执行装置110、数据访问控制装置120和数据存储单元130。
指令执行装置110用于运行数据访问指令。指令执行装置110可以使用任何具有指令执行的装置、设备、单元或模块来实现,例如,可以使用中央处理器(CPU,Central Processing Unit),微处理器(MPU,Micro Processor Unit)、数字信号处理器(DSP,Digital Signal Processing)、FPGA芯片等实现。数据访问指令可以包括数据写入指令和数据读取指令。数据写入指令的示例例如可以是“mov r1%,(%r2)”。该数据写入指令指示“将寄存器r1的内容存放到寄存器r2指向的缓存/内存中”。数据读取指令的示例例如可以是“mov(%r2),r1%”。该数据读取指令指示“将寄存器r2指向的缓存/内存中存储的内容读取到寄存器r1”。其中,寄存器r2中存放虚拟地址,例如,0x010101AF5518。
在指令执行装置110运行数据访问指令时,指令执行装置110将数据访问指令中的虚拟地址转换为待访问的数据所在物理页的物理地址,即,物理地址空间中的物理地址。
图2示出了根据本说明书的实施例的用于将虚拟地址转换为物理地址的一个示例过程的示意图。图2中示出了四级页管理架构的示例架构。图2中示出的四级分别为:页全局目录PGD(即,图2中的P4页)、页上级目录PUD(即,图2中的P3页)、页中间目录PMD(即,图2中的P2页)和页表PT(即,图2中的P1页)。
如图2中,假设虚拟地址0x010101AF5518,将该虚拟地址换成2进制0000 0001 0000 0001 0000 0001 1010 1111 0101 0101 0001 1000,然后按照9-9-9-9-12的位数拆分成5个部分。如图2中所示,第1部分包括39到47位(页全局目录索引),即,0000 0001 0。第2部分包括30到38位(页上级目录索引),即,000 0001 00。第3部分包括21到29位(页中间目录索引),即,00 0001 101。第4部分包括12~20位(页表项索引),即,0 1111 0101。第5部分包括0~11位(偏移),即,0101 0001 1000。换算成十六进 制后可以得到如下结果:页全局目录索引=2,页上级目录索引=4,页中间目录索引=0xD,页表项索引=0xF5,以及偏移=0x518。
在进行地址转换时,从当前的CR3寄存器中取出物理地址,该物理地址指向进程的页目录页基址,由此可以得到页全局目录页基址。假设CR3寄存器中的物理地址为0xAA0E5000,则页全局目录页基址为0xAA0E5000。操作系统在调度进程时,会将该地址装入CR3寄存器中。
然后,根据页全局目录索引=2,可知页上级目录页PUD的地址存放在页全局目录页PGD的第2项中,由此得到页上级目录页PUD的地址存放在[0xAA0E5000+2*4]=[0xAA0E5008]中,如果该位置所存放的值为0x3D955867,则0x00000867为该页上级目标页PUD的页面属性值,以及0x3D955000为页上级目标页PUD的基址。
接着,根据页上级目录索引=4,可知页中间目录页PMD的地址存放在页上级目录页PUD的第4项,由此得到页中间目录页PMD的地址存放在[0x3D955000+4*4]=[0x3D955010]中,如果该位置存放的值为0x7095E847,则0x00000847为页中间目录页PMD的页面属性,以及0x7095E000为页中间目录页PMD的基址。
接着,根据页中间目录索引=0xD,可知页表项页PT的地址存放在页中间目录页PUD的第4项,由此得到页表项页PT的地址存放在[0x7095E000+0xD*4]=[0x7095E034],如果该位置存放的值为0x8085B817,则0x00000817为页表项页PT的页面属性,以及0x8085B000为页表项也PT的基址。
随后,根据偏移=0x518,可以计算出转换后的物理地址为:0x8085B000+0x00000518=0x8085B518。
此外,指令执行装置110还可以获取所对应的数据访问操作的ECC属性信息。所述ECC属性信息用于指示在对数据存储单元130执行数据访问操作时是否需要执行ECC校验。在本说明书中,ECC属性信息可以根据应用在数据处理时的数据完整性要求来设置。此外,在本说明书中,所述“应用”例如可以包括基于机器学习类的应用。机器学习类的应用在执行过程中需要使用大量的数据,并且在一些数据处理阶段,该应用采用概率统计的方法来处理数据,由于采用概率统计的方式执行数据处理具有容错能力,从而在进行数据访问时,可以无需考虑所获取数据中的每个比特的正确性。换言之, 在这种情况下,可以执行不具有ECC校验的数据访问操作。
在一个示例中,所述ECC属性信息可以设置在待访问的数据所在物理页的页面属性字段中。图3示出了根据本说明书的实施例的物理页页表项的一个示例的示意图。图3中示出的是32位的物理页的页表项的示例。
如图3中所示,在该页表项中,0~11位为页面属性字段,以及12~31位为页面地址位。在页面属性字段中,0~8位已经被使用,以及9~11位为保留位,可以被使用来存放ECC属性信息。例如,ECC属性信息可以使用ECC标志来表示,在ECC标志的值为“1”时指示在进行数据访问时需要执行ECC校验,以及在ECC标志的值为“0”时指示在进行数据访问时不需要执行ECC校验。
在另一示例中,所述ECC属性信息可以设置在数据访问指令中。在本说明书中,可以设置一条新的数据访问指令,在该数据访问指令中增加操作参数来显式地指示ECC属性信息。例如,可以设置数据写入指令“movnecc r1%,(%r2)”。该数据写入指令指示“将寄存器r1的内容存放到寄存器r2指向的缓存/内存中,同时显式地指示数据访问控制装置在进行数据写入时不进行ECC校验”。此外,可以设置数据读取指令“movnecc(r2%),%r1”。该数据读取指令指示“将寄存器r2指向的缓存/内存中的内容,读取到寄存器r1中,同时显式地指示数据访问控制装置在进行数据读取时不进行ECC校验”。
在如上获取物理地址以及ECC属性信息后,指令执行装置110向数据访问控制装置120发送数据访问命令以及ECC属性信息,该数据访问命令包括所转换的物理地址。例如,数据访问命令可以基于所转换的物理地址以及数据访问指令来生成。
在接收到数据访问命令以及ECC属性信息后,数据访问控制装置120根据ECC属性信息来对数据存储单元130执行数据访问。数据访问控制装置120的处理过程将在下面参照图4进行详细说明。这里要说明的是,数据存储单元130可以是任何类型的数据存储单元或模块,比如,内存、缓存以及比如SSD的固态存储单元等。相应地,数据访问控制装置120也可以称为缓存/内存控制器。此外,要说明的是,在本说明书的另一示例中,ECC属性信息也可以包括在数据访问命令中。
图4示出了根据本说明书的实施例的数据访问方法400的流程图。
如图4所示,在410,在指令执行装置110处,监测是否接收到数据访问指令。如果没有接收到,则继续进行监测。如果接收到数据访问指令,则在420,将数据访问指令中的虚拟地址转换为物理地址,并且获取ECC属性信息。从虚拟地址到物理地址的 转换过程可以参考上面参照图2描述的地址转换操作。所述ECC属性信息可以从物理地址所在物理页的页面属性字段中提取,或者可以通过分析数据访问指令来获取。
随后,在430,指令执行装置110向数据访问控制装置120发送数据访问命令以及ECC属性信息。该数据访问命令包括转换得到的物理地址。在数据访问命令是数据写入命令的情况下,指令执行装置110还向数据访问控制装置120发送写入数据。
在接收到数据访问命令后,在440,数据访问控制装置120根据ECC属性信息判断在对数据存储单元130进行数据访问时是否需要执行ECC校验。
在ECC属性信息指示不需要执行ECC校验时,在450,数据访问控制装置120根据物理地址来对数据存储单元130执行不具有ECC校验的数据访问操作。
在ECC属性信息指示需要执行ECC校验时,在460,数据访问控制装置120根据物理地址来对数据存储单元130执行具有ECC校验的数据访问操作。
数据访问控制装置120的具体数据访问操作将参照图5和图6,分别针对数据写入操作和数据读取操作进行说明。
图5示出了根据本说明书的实施例的数据写入方法500的示例示意图。
如图5所示,在510,在指令执行装置110处,监测是否接收到数据写入指令。如果没有接收到,则继续进行监测。如果接收到数据写入指令,则在520,将数据写入指令中的虚拟地址转换为物理地址。此外,指令执行装置110还获取ECC属性信息。
随后,在530,指令执行装置110向数据访问控制装置120发送数据写入命令、ECC属性信息和写入数据,该数据写入命令包括经过转换得到的物理地址。
在接收到数据写入命令后,在540,数据访问控制装置120根据ECC属性信息判断在将写入数据写入到数据存储单元130时是否需要执行ECC校验。
在ECC属性信息指示不需要执行ECC校验时,在550,数据访问控制装置120将数据写入命令和写入数据发送到数据存储单元130。随后,在560,数据存储单元130根据数据写入命令来将写入数据写入到该物理地址中。
在ECC属性信息指示需要执行ECC校验时,在570,数据访问控制装置120使用写入数据来生成ECC校验码。然后,在580,数据访问控制装置120将数据写入命令、写入数据以及ECC校验码发送给数据存储单元130。数据存储单元130根据数据写入命令,将写入数据写入到所述物理地址,在590,将ECC校验码写入数据存储单元130 的某个物理地址中,并且使得ECC校验码与写入数据相关联。
图6示出了根据本说明书的实施例的数据读取方法600的示例示意图。
如图6所示,在601,在指令执行装置110处,监测是否接收到数据读取指令。如果没有接收到,则继续进行监测。如果接收到数据读取指令,则在602,将数据读取指令中的虚拟地址转换为物理地址。此外,指令执行装置110还获取ECC属性信息。
随后,在603,指令执行装置110向数据访问控制装置120发送数据读取命令和ECC属性信息,该数据读取命令包括经过转换得到的物理地址。
在接收到数据读取命令和ECC属性信息后,在604,数据访问控制装置120向数据存储单元发送数据读取命令和ECC属性信息。
在605,数据存储单元130根据ECC属性信息判断是否需要执行ECC校验。在判断为不需要执行ECC校验时,在606,数据存储单元130读取该物理地址处的数据(即,读出数据),并且在607,将所读取的数据发送给数据访问控制装置120。在608,数据访问控制装置120将所得到的数据返回给指令执行装置110,以执行后续数据处理。
在判断为需要执行ECC校验时,在609,数据存储单元130读取该处理地址处的数据以及相关联的ECC校验码,并且在610,数据存储单元130将所读取的数据以及ECC校验码发送给数据访问控制装置120。
在接收到读出数据和ECC校验码后,在611,数据访问控制装置120基于所述读出数据以及所述ECC校验码,进行ECC校验处理。具体地,数据访问控制装置120根据所接收到的读出数据来生成ECC校验码,然后将所生成的ECC校验码与所接收的ECC校验码进行比对。如果两个校验码不相同,则进行解码,以确定数据中的哪些比特不正确。
然后,在612,数据访问控制装置120丢弃错误比特,并且将正确的数据返回给指令执行装置120,以执行后续数据处理。
如上参照图1到图6描述了根据本说明书的实施例的数据访问方法。根据该数据访问方法,通过在执行应用的数据访问时根据应用的数据完整性要求来设置ECC属性信息,并且由数据访问控制装置根据所设置的ECC属性信息来控制对数据存储单元执行不具有ECC校验的数据访问或者具有ECC校验的数据访问,由此可以在无需执行ECC校验处理的数据访问操作时不执行ECC校验处理,从而降低数据访问操作时的系统功耗,并且提升数据访问处理的吞吐量。
图7示出了根据本说明书的实施例的数据访问控制装置700的方框图。如图7所示,数据访问控制装置700包括访问命令获取单元710和数据访问单元720。
访问命令获取单元710被配置为从指令执行装置110获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验。访问命令获取单元710的操作可以参考上面参照图4描述的块410的操作。
数据访问单元720被配置为在ECC属性信息指示需要执行ECC校验时,根据物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,以及在ECC属性信息指示不需要执行ECC校验时,根据物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作。数据访问单元720的操作可以参考上面参照图4描述的块450和460的操作。
如上参照图1到图7,对根据本说明书的实施例的数据访问控制方法及数据访问控制装置进行了描述。上面的数据访问控制装置可以采用硬件实现,也可以采用软件或者硬件和软件的组合来实现。
图8示出了根据本说明书的实施例的用于实现数据访问控制的电子设备800的结构框图。
如图8所示,电子设备800可以包括至少一个处理器810、存储器(例如,非易失性存储器)820、内存830、通信接口840以及内部总线860,并且至少一个处理器810、存储器820、内存830和通信接口840经由总线860连接在一起。该至少一个处理器810执行在计算机可读存储介质中存储或编码的至少一个计算机可读指令(即,上述以软件形式实现的元素)。
在一个实施例中,在存储器中存储有计算机可执行指令,其当执行时使得至少一个处理器810:从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验;在所述ECC属性信息指示需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,在所述ECC属性信息指示不需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作,其中,所述物理地址通过在所述指令执行装置处对所接收的数据访问指令中的虚拟地址进行转换而得到。
应该理解的是,在存储器中存储的计算机可执行指令当执行时使得至少一个处理器810执行在本说明书的各个实施例中如上结合图1-7描述的各种操作和功能。
根据一个实施例,提供了一种例如非暂时性机器可读介质的程序产品。非暂时性机器可读介质可以具有指令(即,上述以软件形式实现的元素),该指令当被机器执行时,使得机器执行本说明书的各个实施例中如上结合图1-7描述的各种操作和功能。
具体地,可以提供配有可读存储介质的系统或者装置,在该可读存储介质上存储着实现上述实施例中任一实施例的功能的软件程序代码,且使该系统或者装置的计算机或处理器读出并执行存储在该可读存储介质中的指令。
在这种情况下,从可读介质读取的程序代码本身可实现上述实施例中任何一项实施例的功能,因此机器可读代码和存储机器可读代码的可读存储介质构成了本说明书的一部分。
可读存储介质的实施例包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD-RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上或云上下载程序代码。
本领域技术人员应当理解,上面公开的各个实施例可以在不偏离发明实质的情况下做出各种变形和修改。因此,本公开的保护范围应当由所附的权利要求书来限定。
需要说明的是,上述各流程和各系统结构图中不是所有的步骤和单元都是必须的,可以根据实际的需要忽略某些步骤或单元。各步骤的执行顺序不是固定的,可以根据需要进行确定。上述各实施例中描述的装置结构可以是物理结构,也可以是逻辑结构,即,有些单元可能由同一物理实体实现,或者,有些单元可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。
以上各实施例中,硬件单元或模块可以通过机械方式或电气方式实现。例如,一个硬件单元、模块或处理器可以包括永久性专用的电路或逻辑(如专门的处理器,FPGA或ASIC)来完成相应操作。硬件单元或处理器还可以包括可编程逻辑或电路(如通用处理器或其它可编程处理器),可以由软件进行临时的设置以完成相应操作。具体实现方式(机械方式、或专用的永久性电路、或者临时设置的电路)可以基于成本和时间上的考虑来确定。
上面结合附图阐述的具体实施方式描述了示例性实施例,但并不表示可以实现的或者落入权利要求书的保护范围的所有实施例。在整个本说明书中使用的术语“示例性” 意味着“用作示例、实例或例示”,并不意味着比其它实施例“优选”或“具有优势”。出于提供对所描述技术的理解的目的,具体实施方式包括具体细节。然而,可以在没有这些具体细节的情况下实施这些技术。在一些实例中,为了避免对所描述的实施例的概念造成难以理解,公知的结构和装置以框图形式示出。
本公开内容的上述描述被提供来使得本领域任何普通技术人员能够实现或者使用本公开内容。对于本领域普通技术人员来说,对本公开内容进行的各种修改是显而易见的,并且,也可以在不脱离本公开内容的保护范围的情况下,将本文所定义的一般性原理应用于其它变型。因此,本公开内容并不限于本文所描述的示例和设计,而是与符合本文公开的原理和新颖性特征的最广范围相一致。

Claims (14)

  1. 一种数据访问控制方法,包括:
    从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验;
    在所述ECC属性信息指示需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,
    在所述ECC属性信息指示不需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作,
    其中,所述物理地址通过在所述指令执行装置处对所接收的数据访问指令中的虚拟地址进行转换而得到。
  2. 如权利要求1所述的数据访问控制方法,其中,所述ECC属性信息的属性值根据所述应用在进行数据处理时的数据完整性要求确定。
  3. 如权利要求1所述的数据访问控制方法,其中,所述ECC属性信息被设置在所述物理地址所在物理页的页面属性字段中。
  4. 如权利要求1所述的数据访问控制方法,其中,所述ECC属性信息被设置在所述数据访问指令中。
  5. 如权利要求1所述的数据访问控制方法,其中,所述数据访问命令包括数据写入命令,从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息包括:
    从指令执行装置获取应用针对数据存储单元的数据写入命令、ECC属性信息以及写入数据,
    根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作包括:
    使用所述写入数据来生成ECC校验码;以及
    将所述数据写入命令、写入数据以及所述ECC校验码发送给所述数据存储单元,所述数据存储单元根据所述数据写入命令,对所述ECC校验码与所述写入数据执行相关联的写入操作,其中,所述写入数据被写入到所述物理地址,以及
    根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作包括:
    将所述数据写入命令和所述写入数据发送给所述数据存储单元,所述数据存储单元根据所述数据写入命令,将所述写入数据写入所述物理地址。
  6. 如权利要求1所述的数据访问控制方法,其中,所述数据访问命令包括数据读取命令,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作包括:
    将所述数据读取命令发送给所述数据存储单元,所述数据存储单元根据所述物理地址获取读出数据以及相关联的ECC校验码;
    从所述数据存储单元接收所述读出数据以及所述ECC校验码;
    基于所述读出数据以及所述ECC校验码,进行ECC校验处理;
    将经过ECC校验处理后的读出数据发送给所述指令执行装置,以及
    根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作包括:
    将所述数据读取命令发送给所述数据存储单元,所述数据存储单元根据所述物理地址获取读出数据;
    从所述数据存储单元接收所述读出数据;
    将所述读出数据发送给所述指令执行装置。
  7. 如权利要求1到6中任一项所述的数据访问控制方法,其中,所述应用包括机器学习类应用。
  8. 一种数据访问控制装置,包括:
    访问命令获取单元,从指令执行装置获取应用针对数据存储单元的数据访问命令以及ECC属性信息,所述数据访问命令包括待访问的物理地址,所述ECC属性用于指示在进行数据访问操作时是否需要执行ECC校验;
    数据访问单元,在所述ECC属性信息指示需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行具有ECC校验的数据访问操作,以及在所述ECC属性信息指示不需要执行所述ECC校验时,根据所述物理地址来对所述数据存储单元执行不具有ECC校验的数据访问操作,
    其中,所述物理地址通过在所述指令执行装置处对所接收的数据访问指令中的虚拟地址进行转换而得到。
  9. 如权利要求8所述的数据访问控制装置,其中,所述ECC属性信息被设置在所述物理地址所在物理页的页面属性字段中。
  10. 如权利要求8所述的数据访问控制装置,其中,所述ECC属性信息被设置在所述数据访问指令中。
  11. 一种数据访问设备,包括:
    指令执行装置,将数据访问指令中的虚拟地址转换为物理地址以及获取ECC属性信息;以及
    如权利要求8到10中任一项所述的数据访问控制装置。
  12. 一种数据访问系统,包括
    如权利要求11所述的数据访问设备;以及
    数据存储单元。
  13. 一种电子设备,包括:
    一个或多个处理器,以及
    与所述一个或多个处理器耦合的存储器,所述存储器存储指令,当所述指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1到7中任一项所述的数据访问控制方法。
  14. 一种机器可读存储介质,存储有可执行指令,所述指令当被执行时使得所述机器执行如权利要求1到7中任一项所述的数据访问控制方法。
PCT/CN2020/132439 2020-01-06 2020-11-27 数据访问控制方法及装置、数据访问设备及系统 WO2021139443A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010008548.6 2020-01-06
CN202010008548.6A CN111209137B (zh) 2020-01-06 2020-01-06 数据访问控制方法及装置、数据访问设备及系统

Publications (1)

Publication Number Publication Date
WO2021139443A1 true WO2021139443A1 (zh) 2021-07-15

Family

ID=70785931

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132439 WO2021139443A1 (zh) 2020-01-06 2020-11-27 数据访问控制方法及装置、数据访问设备及系统

Country Status (2)

Country Link
CN (1) CN111209137B (zh)
WO (1) WO2021139443A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209137B (zh) * 2020-01-06 2021-09-17 支付宝(杭州)信息技术有限公司 数据访问控制方法及装置、数据访问设备及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109705A1 (en) * 2006-10-18 2008-05-08 Pawlowski J Thomas Memory system and method using ECC with flag bit to identify modified data
US20140310569A1 (en) * 2013-04-11 2014-10-16 Spansion Llc Restoring ECC syndrome in non-volatile memory devices
CN105630418A (zh) * 2015-12-24 2016-06-01 曙光信息产业(北京)有限公司 一种数据存储方法及装置
CN108665939A (zh) * 2017-03-31 2018-10-16 厦门鑫忆讯科技有限公司 为存储器提供ecc的方法与装置
CN111209137A (zh) * 2020-01-06 2020-05-29 支付宝(杭州)信息技术有限公司 数据访问控制方法及装置、数据访问设备及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7594135B2 (en) * 2003-12-31 2009-09-22 Sandisk Corporation Flash memory system startup operation
WO2011038329A1 (en) * 2009-09-28 2011-03-31 Nvidia Corporation Error detection and correction for external dram
US8607121B2 (en) * 2011-04-29 2013-12-10 Freescale Semiconductor, Inc. Selective error detection and error correction for a memory interface
US20150248316A1 (en) * 2012-09-28 2015-09-03 Hewlett-Packard Development Company, L.P. System and method for dynamically selecting between memory error detection and error correction
CN104810061B (zh) * 2014-01-28 2018-08-24 旺宏电子股份有限公司 存储器及其操作方法
JP6527054B2 (ja) * 2015-08-28 2019-06-05 東芝メモリ株式会社 メモリシステム
CN108255633B (zh) * 2016-12-28 2021-07-30 旺宏电子股份有限公司 存储控制方法、存储装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109705A1 (en) * 2006-10-18 2008-05-08 Pawlowski J Thomas Memory system and method using ECC with flag bit to identify modified data
US20140310569A1 (en) * 2013-04-11 2014-10-16 Spansion Llc Restoring ECC syndrome in non-volatile memory devices
CN105630418A (zh) * 2015-12-24 2016-06-01 曙光信息产业(北京)有限公司 一种数据存储方法及装置
CN108665939A (zh) * 2017-03-31 2018-10-16 厦门鑫忆讯科技有限公司 为存储器提供ecc的方法与装置
CN111209137A (zh) * 2020-01-06 2020-05-29 支付宝(杭州)信息技术有限公司 数据访问控制方法及装置、数据访问设备及系统

Also Published As

Publication number Publication date
CN111209137A (zh) 2020-05-29
CN111209137B (zh) 2021-09-17

Similar Documents

Publication Publication Date Title
CN102937922B (zh) 查询和修复数据
US9389947B2 (en) Portable executable file analysis
CN108363640B (zh) 数据校验方法及装置、计算机可读存储介质
US9298592B2 (en) Testing a software interface for a streaming hardware device
CN103164523A (zh) 数据一致性检查方法、装置及系统
CN103631721A (zh) 一种隔离内存中坏块的方法及系统
CN110019873B (zh) 人脸数据处理方法、装置及设备
CN113254887A (zh) 一种应用程序的授权方法、计算设备以及存储介质
WO2023151501A1 (zh) 数据校验方法及系统
US20100293418A1 (en) Memory device, data transfer control device, data transfer method, and computer program product
CN105302924A (zh) 一种文件管理方法及装置
US10489244B2 (en) Systems and methods for detecting and correcting memory corruptions in software
WO2021139443A1 (zh) 数据访问控制方法及装置、数据访问设备及系统
WO2020258500A1 (zh) 光学字符识别辅助方法、装置、计算机设备及存储介质
US20200334358A1 (en) Method for detecting computer virus, computing device, and storage medium
WO2022179121A1 (zh) 脚本自动生成方法、装置、电子设备及存储介质
WO2020000947A1 (zh) 实现封装形式的bios数据刷写的方法、装置及设备
CN108133026B (zh) 一种多数据的处理方法、系统及存储介质
WO2021012732A1 (zh) 基于区块链的信息验证装置、方法及存储介质
CN111464258B (zh) 一种数据校验方法、装置、计算设备及介质
CN116522368A (zh) 一种物联网设备固件解密解析方法、电子设备、介质
WO2020233044A1 (zh) 一种插件校验方法、设备、服务器及计算机可读存储介质
CN108959411B (zh) Etl任务的处理方法、装置和设备
CN105354107A (zh) NOR Flash的数据传输方法及系统
CN106326310B (zh) 一种手机客户端软件的资源加密更新方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20911780

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911780

Country of ref document: EP

Kind code of ref document: A1