CN1851675A - Processor high-speed data buffer memory reconfiguration method - Google Patents

Processor high-speed data buffer memory reconfiguration method Download PDF

Info

Publication number
CN1851675A
CN1851675A CNA2006100501852A CN200610050185A CN1851675A CN 1851675 A CN1851675 A CN 1851675A CN A2006100501852 A CNA2006100501852 A CN A2006100501852A CN 200610050185 A CN200610050185 A CN 200610050185A CN 1851675 A CN1851675 A CN 1851675A
Authority
CN
China
Prior art keywords
buffer memory
memory
data
data cache
processor
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
CNA2006100501852A
Other languages
Chinese (zh)
Other versions
CN100377116C (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CNB2006100501852A priority Critical patent/CN100377116C/en
Publication of CN1851675A publication Critical patent/CN1851675A/en
Application granted granted Critical
Publication of CN100377116C publication Critical patent/CN100377116C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The present invention realizes reconfiguration processor data cache, mapping it to fixed memory space, its primary function being to provide system-calling interface for reconfiguring processor data cache as cache type RAM, thereby to make original transparent processor cache to programmer became visible. The present invention can be used in variable general-purpose temporary memory which can provide larger area than register file.

Description

Processor high-speed data buffer memory reconfiguration method
Technical field
The present invention relates to the optimisation technique field of operating system, relate to operating system storage architecture field, particularly relate to a kind of processor high-speed data buffer memory reconfiguration method.
Background technology
So-called processor cache is commonly referred to as second level cache, or External Cache.Be cache memory, be positioned at scale between CPU and the primary memory DRAM (Dynamic RAM) less but the very high storer of speed form by SRAM (static RAM) usually.Be used for depositing those by the frequent data of using of CPU, so that make CPU needn't depend on slow DRAM (dynamic RAM).
Processor cache is prior to internal memory and CPU swap data, so speed is very fast.L1 Cache (level cache) is a CPU ground floor high-speed cache.The capacity and the structure of built-in L1 high-speed cache are bigger to the performance impact of CPU, but cache memory forms by static RAM (SRAM), and structure is complicated, and under the CPU die area can not too big situation, the capacity of L1 level high-speed cache can not be done too greatly.The capacity of general L1 buffer memory is usually at 32-256KB.L2 Cache (L2 cache) is the second layer high-speed cache of CPU, divides inside and outside two kinds of chips.Inner chip L2 cache travelling speed is identical with dominant frequency, and outside L2 cache then has only half of dominant frequency.The L2 cache capacity also can influence the performance of CPU, and principle is to be the bigger the better, and the L2 buffer memory of present common desktop computer CPU is 512KB to the maximum, and the L2 high-speed cache with CPU reaches as high as 1MB-3MB on notebook, server and the workstation.
The basic thought of processor cache depends on " locality of quoting " exactly, and this can be divided into temporal locality and spatial locality.Spatial locality is meant that CPU at a time needs certain data, and next step just needs near its data so probably; Temporal locality be meant when the accessed mistake of certain data once after, do not cross and how long will be visited again.For application program, no matter be the locality phenomenon that instruction stream or data stream all can occur quoting.Therefore can be with a spot of SRAM as the buffer zone between CPU and the DRAM storage system, i.e. Cache system.Cache is also referred to as one-level Cache in the sheet.Because the clock frequency of high-grade processor is very high, in case the miss situation of one-level Cache occurs, performance will obviously worsen.The way of Cai Yonging is to add Cache outside processor chips more in this case, is called second-level cache.Second-level cache is actually the real buffering between CPU and the main memory.
If in temporal locality, use rational replacement policy just can improve the result of use of buffer memory greatly.And replacement policy will determine in the present buffer memory certain piece will by certain new replace.Certainly select a new piece to replace obsolete now of buffer memory at random, also can use the mode of what FIFO (First In FirstOut first in first out), LIFO (last in, first out for Last In First Out) and so on.But, above all modes all do not consider the reusable problem of piece.
Best strategy is to remove in the buffer memory not to be used the longest piece of time at present, also can state the piece of removing access times minimum (LRU, least Recently Used is recently minimum by the user) as.If a piece has not used for some time, that chance that looks that this piece is used again in the operation of this workspace is also just minimum, just should shift out.
The algorithm of this LRU is very much idealized, if really in buffer memory control, add the frequency of utilization function of checking each piece, so not only buffer memory design will be more complicated, and such inspection also will occupy the relative time, and cause the delay of operation when shifting out piece.Puppet-lru algorithm that the design of present most of buffer memorys all is to use is done mark with obsolete, when new piece will enter buffer memory, just replaces that maximum piece of mark.
But sometimes " piece " to be moved out of not be because no longer use, but buffer memory capacity is not much of that, is necessary for piece to be advanced and makes way, to satisfy the needs in work at present district.This situation is exactly a kind of at last among the Cache Miss, and " Capacity Miss (capacity disappearance) " has to exactly because the problem of capacity shifts out useful piece.
The XSBase27X development platform is based on Intel High performance PXA27X processor also is equipped with built-in Linux.This platform has been realized powerful extendability and the performance that can test the PXA27X peripherals overwhelming majority by various interface.
This platform passes through Intel The PXA27X processor has been realized high-performance and minimum power consumption, so it is fit to do mobile device very much.The linux kernel that this platform is equipped with is up-to-date 2.6.11 version, and this operating system generally acknowledges it is the most reliable and the most stable system, the user can be in stable environment working procedure, and can from the Linux stability of network, obtain benefited.Application program can be moved in the environment that does not have External memory equipment such as hard disk.The MTD mode flash memory file system (JFFS2) that adopts provides the utilization factor and the reliability service of maximum capacity.On stream, the various expansion interfaces of PXA 27X processor provide great extendability and convenience.
XScale nuclear is the processor that adopts ARM V5TE framework, is the upgraded product of the StrongARM of Intel Company.It has characteristics such as high-performance, low-power consumption, but, it with the form of nuclear as the member (building block) of ASSP (Application specific Standard Productor).PXA250 and PXA210 application processor are exactly the ASSP as the portable equipment design.And adopt first application processor of XScale nuclear is 80200 of Intel, uses as I/O.
Summary of the invention
The object of the present invention is to provide a kind of processor high-speed data buffer memory reconfiguration method.
The technical scheme that the present invention solves its technical matters employing is as follows:
1) carries out exchanges data with processor high-speed data buffer memory behavior allocation units processor high-speed data buffer memory with behavior elementary cell and internal memory, data to internal memory are carried out buffer memory, so data cache is reshuffled the buffer memory type random access memory of formation also with the capable elementary cell as allocation of space of processor high-speed data buffer memory;
2) providing the reconfiguration system calling interface is that built-in Linux operating system adds the system call that processor high-speed data buffer memory is reshuffled, and reshuffles the interface of data cache as the programmer;
3) determine to reshuffle the data cache size, distribute equal size internal memory space because the access features of processor high speed buffer memory and internal memory, when determining that reshuffling the data cache size will be configured to the memory headroom of buffer memory type random access memory with distribution, two principle is arranged:
I. determine to reshuffle the data cache size, because processor high-speed data buffer memory carries out exchanges data with behavior elementary cell and internal memory, data to internal memory are carried out buffer memory, so the data cache size of reshuffling must be with the behavior elementary cell of data cache;
II. storage allocation space, because the restriction of bus bandwidth, internal storage data with the bus bandwidth be the unit when aliging efficient will improve, so, the memory headroom that will the be configured to buffer memory type random access memory distribution of should aliging with the line width higher value between the two of bus bandwidth and data cache;
4) reconfiguration process device data cache
Reconfiguration process device data cache need carry out following steps:
I. obtain the internal memory start address that will be configured to buffer memory type random access memory;
II. locks processor data cache;
III. the distribution processor data cache is capable;
IV. remove the processor high-speed data buffer memory lock.
The present invention compares with background technology, and the useful effect that has is:
The present invention is a kind of method that processor high-speed data buffer memory is a buffer memory type random access memory that reconfigures in the built-in Linux operating system based on PXA 27X, its major function is to provide the developer system to reconfigure the system call interfaces that processor high-speed data buffer memory is a buffer memory type random access memory as required in operating system grade, originally becomes visible to programmer's transparent treated device buffer memory thereby make.Can be used for variable temporary (Scratch) storer commonly used, it can provide the zone bigger than register file.
(1) make the programmer can the Operation Processor data cache.Thereby the programmer can reside among the buffer memory type random access memory frequently-used data in the program by explicitly, promptly among processor high-speed data buffer memory, needn't just be loaded into processor high-speed data buffer memory when needed.
(2) access speed of variable commonly used in the significantly raising program.System can allow variable commonly used resides among the buffer memory type random access memory in the program, thereby can not be replaced out processor high-speed data buffer memory.Therefore can effectively reduce the cold start-up mismatch of these frequent data item visits, thereby improve the speed of data access.
Description of drawings
Accompanying drawing is an overview flow chart of the present invention.
Embodiment
The specific implementation flow process of processor high-speed data buffer memory reconfiguration method is as follows.
The first step: with processor high-speed data buffer memory behavior allocation units.
Processor high-speed data buffer memory carries out exchanges data with behavior elementary cell and internal memory, data to internal memory are carried out buffer memory, so data cache is reshuffled the buffer memory type random access memory of formation also with the capable elementary cell as allocation of space of processor high-speed data buffer memory.
The D-Cache of XScale is the 32K byte, adopts the image mode of 32 road set associatives, promptly is divided into 32 groups, and every group has 32 the tunnel, every behavior 32 bytes and 1 significance bit.In addition, every row also comprises 2 " dirty " (dirty) position, illustrates respectively whether low 16 bytes and high 16 bytes were rewritten.When visit Cache hit, rose the dirty position of corresponding hemistich (16 byte).So in the realization based on the processor high-speed data buffer memory reconfiguration method of the built-in Linux operating system of PXA 27X, the basic allocation unit size of system is 32 bytes.
Second step: the reconfiguration system calling interface is provided.
For built-in Linux operating system adds the system call that processor high-speed data buffer memory is reshuffled, reshuffle the interface of data cache as the programmer.
Want add-on system to call at first will to select one and existing system to call the system call title of not conflicting, i.e. interface name.Then select or add a still untapped system call number, add-on system calls list item in subsystem call table then.The 3rd step: determine to reshuffle the data cache size, distribute equal size internal memory space.
Because the access features of processor high speed buffer memory and internal memory when determining that reshuffling the data cache size will be configured to the memory headroom of buffer memory type random access memory with distribution, has two principle:
I. determine to reshuffle the data cache size.Because processor high-speed data buffer memory carries out exchanges data with behavior elementary cell and internal memory, the data of internal memory is carried out buffer memory, so the data cache size of reshuffling must be with the behavior elementary cell of data cache.In the realization based on the processor high-speed data buffer memory reconfiguration method of the built-in Linux operating system of PXA 27X, the memory headroom size of the buffer memory type that will the be configured to random access memory of system assignment is necessary for the integral multiple of 32 bytes.
II. storage allocation space, because the restriction of bus bandwidth, internal storage data with the bus bandwidth be the unit when aliging efficient will improve, so, the memory headroom that will the be configured to buffer memory type random access memory distribution of should aliging with the line width higher value between the two of bus bandwidth and data cache.
The 4th step: reconfiguration process device data cache.
The XScale microstructure has adopted associations such as CP15 (MMU control), CP14 (performance monitoring) and CPO (DSP processing) to handle.Compare with general A RM framework, increased CP14 and CP coprocessor, and CP15 has also increased new function.
The Data Cache reconstruct of Xscale realizes by the latching operation of the Data Cache of the register 9 of CP15 coprocessor (being used for MMU control).
Reconfiguration process device data cache need carry out following steps:
I. obtain the internal memory start address and the space size that will be configured to buffer memory type random access memory.
Because the operation to coprocessor CP15 belongs to privileged operation, only allow to carry out, enter the kernel state space from the transmission of user's state space so system will be configured to the start address of the memory headroom of buffer memory type random access memory by register in the operating system nucleus attitude.
II. locks processor data cache.
Should forbid that in the capable assigning process of processor high-speed data buffer memory other manipulate data cache, so before cache lines is distributed beginning, the system lock processor high-speed data buffer memory.Before the locks processor data cache, need the access of hanging in the emptying metadata cache.
III. the distribution processor data cache is capable.
The size in Pei Zhi buffer memory type random access memory space distributes the processor high-speed data buffer memory of identical size capable as required.And it is capable that pre-assigned memory headroom is mapped to processor high-speed data buffer memory, and therefore, the programmer can be as using common memory to use buffer memory type random access memory space in program.
IV. remove the processor high-speed data buffer memory lock.
Processor high-speed data buffer memory is capable assigned after, the processor high-speed data buffer memory latch-release.Before release, need the access of hanging in the emptying metadata cache.

Claims (1)

1. processor high-speed data buffer memory reconfiguration method is characterized in that:
1) with processor high-speed data buffer memory behavior allocation units
Processor high-speed data buffer memory carries out exchanges data with behavior elementary cell and internal memory, data to internal memory are carried out buffer memory, so data cache is reshuffled the buffer memory type random access memory of formation also with the capable elementary cell as allocation of space of processor high-speed data buffer memory;
2) provide the reconfiguration system calling interface
For built-in Linux operating system adds the system call that processor high-speed data buffer memory is reshuffled, reshuffle the interface of data cache as the programmer;
3) determine to reshuffle the data cache size, distribute equal size internal memory space
Because the access features of processor high speed buffer memory and internal memory when determining that reshuffling the data cache size will be configured to the memory headroom of buffer memory type random access memory with distribution, has two principle:
I. determine to reshuffle the data cache size, because processor high-speed data buffer memory carries out exchanges data with behavior elementary cell and internal memory, data to internal memory are carried out buffer memory, so the data cache size of reshuffling must be with the behavior elementary cell of data cache;
II. storage allocation space, because the restriction of bus bandwidth, internal storage data with the bus bandwidth be the unit when aliging efficient will improve, so, the memory headroom that will the be configured to buffer memory type random access memory distribution of should aliging with the line width higher value between the two of bus bandwidth and data cache;
4) reconfiguration process device data cache
Reconfiguration process device data cache need carry out following steps:
I. obtain the internal memory start address that will be configured to buffer memory type random access memory;
II. locks processor data cache;
III. the distribution processor data cache is capable;
IV. remove the processor high-speed data buffer memory lock.
CNB2006100501852A 2006-04-04 2006-04-04 Processor high-speed data buffer memory reconfiguration method Expired - Fee Related CN100377116C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100501852A CN100377116C (en) 2006-04-04 2006-04-04 Processor high-speed data buffer memory reconfiguration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100501852A CN100377116C (en) 2006-04-04 2006-04-04 Processor high-speed data buffer memory reconfiguration method

Publications (2)

Publication Number Publication Date
CN1851675A true CN1851675A (en) 2006-10-25
CN100377116C CN100377116C (en) 2008-03-26

Family

ID=37133154

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100501852A Expired - Fee Related CN100377116C (en) 2006-04-04 2006-04-04 Processor high-speed data buffer memory reconfiguration method

Country Status (1)

Country Link
CN (1) CN100377116C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009082887A1 (en) * 2007-12-29 2009-07-09 Hangzhou H3C Technologies Co., Ltd. Content searching method, system and engine distribution unit
CN101162440B (en) * 2007-11-20 2010-06-30 杭州中天微系统有限公司 Design method for built-in processor high speed on-line download straight-through channel
CN101989236A (en) * 2010-11-04 2011-03-23 浙江大学 Method for realizing instruction buffer lock
CN102063303A (en) * 2010-12-22 2011-05-18 浙大网新科技股份有限公司 Method for supporting kdata page of WinCE/WM by Linux kernel
CN107771322A (en) * 2015-05-14 2018-03-06 赛灵思公司 The management of memory resource in programmable integrated circuit

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69715203T2 (en) * 1997-10-10 2003-07-31 Bull S.A., Louveciennes A data processing system with cc-NUMA (cache coherent, non-uniform memory access) architecture and cache memory contained in local memory for remote access
TW451132B (en) * 1998-12-15 2001-08-21 Nippon Electric Co System and method for cache processing
CN1267824C (en) * 2003-02-13 2006-08-02 上海交通大学 Digital signal processor with a reconfigurable cache
CN1746865A (en) * 2005-10-13 2006-03-15 上海交通大学 Method for realizing reconfiguration instruction cache part of digital signal processor

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162440B (en) * 2007-11-20 2010-06-30 杭州中天微系统有限公司 Design method for built-in processor high speed on-line download straight-through channel
WO2009082887A1 (en) * 2007-12-29 2009-07-09 Hangzhou H3C Technologies Co., Ltd. Content searching method, system and engine distribution unit
CN101989236A (en) * 2010-11-04 2011-03-23 浙江大学 Method for realizing instruction buffer lock
CN101989236B (en) * 2010-11-04 2012-05-09 浙江大学 Method for realizing instruction buffer lock
CN102063303A (en) * 2010-12-22 2011-05-18 浙大网新科技股份有限公司 Method for supporting kdata page of WinCE/WM by Linux kernel
CN102063303B (en) * 2010-12-22 2013-07-31 浙大网新科技股份有限公司 Method for supporting kdata page of WinCE/WM by Linux kernel
CN107771322A (en) * 2015-05-14 2018-03-06 赛灵思公司 The management of memory resource in programmable integrated circuit
CN107771322B (en) * 2015-05-14 2021-06-29 赛灵思公司 Management of memory resources in programmable integrated circuits

Also Published As

Publication number Publication date
CN100377116C (en) 2008-03-26

Similar Documents

Publication Publication Date Title
US9384134B2 (en) Persistent memory for processor main memory
US7711902B2 (en) Area effective cache with pseudo associative memory
JP6009589B2 (en) Apparatus and method for reducing castout in a multi-level cache hierarchy
US8453015B2 (en) Memory allocation for crash dump
US8938601B2 (en) Hybrid memory system having a volatile memory with cache and method of managing the same
US8412907B1 (en) System, method and computer program product for application-level cache-mapping awareness and reallocation
US8230179B2 (en) Administering non-cacheable memory load instructions
EP2179361B1 (en) Cache sector allocation
US20130173863A1 (en) Memory Management Among Levels Of Cache In A Memory Hierarchy
US20120159103A1 (en) System and method for providing stealth memory
CN1940892A (en) Circuit arrangement, data processing system and method of cache eviction
JP2014130606A (en) Backing store buffer for register save engine of stacked register file
US10824555B2 (en) Method and system for flash-aware heap memory management wherein responsive to a page fault, mapping a physical page (of a logical segment) that was previously reserved in response to another page fault for another page in the first logical segment
US6421761B1 (en) Partitioned cache and management method for selectively caching data by type
JP5226010B2 (en) Shared cache control device, shared cache control method, and integrated circuit
US7103747B2 (en) Memory table and memory manager for use in managing memory
US7721047B2 (en) System, method and computer program product for application-level cache-mapping awareness and reallocation requests
CN1851675A (en) Processor high-speed data buffer memory reconfiguration method
US9552295B2 (en) Performance and energy efficiency while using large pages
Yu et al. Redesign the memory allocator for non-volatile main memory
CN113138851B (en) Data management method, related device and system
US20040243765A1 (en) Multithreaded processor with multiple caches
Ataie et al. SVAGC: Garbage Collection with a Scalable Virtual Address Swapping Technique
US20040024970A1 (en) Methods and apparatuses for managing memory
US20090024798A1 (en) Storing Data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080326

Termination date: 20120404