IP Library › Granted Patent US 10,114,762
Granted Patent B2
US 10,114,762 · App. 15/047,938 · Granted Oct 30, 2018

Method and apparatus for querying physical memory address

Inventors: Xubin Guo (Beijing, CN); Rui Hou (Beijing, CN); Yujing Feng (Beijing, CN); Dongfeng Su (Beijing, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F12/1045G06F12/0842G06F12/1027G06F12/0862G06F12/1009G06F2212/1016G06F2212/1021G06F2212/6022G06F2212/654G06F2212/68G06F2212/681
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,114,762
App. No.
15/047,938
Granted
Oct 30, 2018
Kind
B2
Abstract

A method and an apparatus for querying a physical memory address where the method includes storing, into a prefetch buffer, page table entries of a second thread that is to perform addressing that are stored in a standby buffer, where the standby buffer stores page table entries that are not queried within a set time in a translation lookaside buffer (TLB), receiving a memory addressing request message that carries a virtual address and is sent by the second thread, and querying, in the TLB and the prefetch buffer, a corresponding physical address according to the virtual address.

Claims (41)

1. A method for querying a physical address to access a memory, the method comprising:

deleting data stored in a prefetch buffer;

storing, after deleting the data, page table entries of a second thread into the prefetch buffer when determining that a memory addressing operation will be switched from a first thread to the second thread within a future set time, wherein the page table entries of the second thread were previously stored in a standby buffer corresponding to only the second thread, and wherein the standby buffer stores page table entries of the second thread that are not queried within a set time in a translation lookaside buffer (TLB);

receiving a memory addressing request message corresponding to the second thread, wherein the memory addressing request message comprises a virtual address; and

querying, in parallel, page table entries stored in the TLB and the page table entries stored in the prefetch buffer for the virtual address.

2. The method of claim 1 , further comprising:

retrieving a first physical address corresponding to the virtual address when the virtual address exists in the TLB; and

accessing the memory using the first physical address.

3. The method of claim 1 , further comprising:

retrieving a second physical address corresponding to the virtual address when the virtual address exists in the prefetch buffer; and

accessing the memory using the second physical address.

4. The method of claim 3 , further comprising storing, into the TLB, a page table entry from the prefetch buffer, the page table entry comprising the virtual address and the second physical address.

5. The method of claim 4 , further comprising deleting, from the prefetch buffer, the page table entry comprising the virtual address and the second physical address.

6. The method of claim 1 , further comprising:

querying the memory for a third physical address corresponding to the virtual address when the virtual address does not exist in the TLB or the prefetch buffer.

7. The method of claim 6 , further comprising storing, into the TLB, another page table entry from the memory, the another page table entry comprising the virtual address and the third physical address.

8. The method of claim 1 , further comprising, storing, into the standby buffer, the page table entries that are not queried within the set time in the TLB prior to storing page table entries of the second thread into the prefetch buffer.

9. The method of claim 8 , wherein after storing, into the standby buffer, the page table entries, the method further comprises deleting, from the TLB, the page table entries when a quantity of other page table entries stored in the TLB exceeds a storage capacity of the TLB.

10. The method of claim 8 , wherein after storing into the standby buffer, the page table entries, the method further comprises deleting another page table entry with a longest storage time from the standby buffer when a quantity of page table entries stored in the standby buffer exceeds a storage capacity of the standby buffer.

11. A multi-threaded processor coupled to a memory, wherein the multi-threaded processor comprises:

a translation lookaside buffer (TLB);

a prefetch buffer;

a standby buffer corresponding to only a second thread, coupled to the TLB and the prefetch buffer, and configured to store page table entries of the second thread that are not queried within a set time in the TLB;

a memory manager coupled to the TLB, the prefetch buffer and the standby buffer, wherein the memory manager is configured to:

delete data stored in a prefetch buffer;

store, after deleting the data, page table entries of the second thread into the prefetch buffer when determining, according to a preset thread switching policy, that a memory addressing operation will be switched from a first thread to the second thread within a future set time, wherein the page table entries of the second thread were previously stored in the standby buffer, and wherein the standby buffer stores page table entries that are not queried within a set time in the TLB;

receive a memory addressing request message corresponding to the second thread, wherein the memory addressing request message comprises a virtual address; and

query, in parallel, page table entries stored in the TLB and the page table entries stored in the prefetch buffer for the virtual address.

12. The multi-threaded processor of claim 11 , wherein the memory manager is further configured to:

retrieve a first physical address corresponding to the virtual address when the virtual address exists in the TLB; and

access the memory using the first physical address.

13. The multi-threaded processor of claim 11 , wherein the memory manager is further configured to:

retrieve a second physical address corresponding to the virtual address when the virtual address exists in the prefetch buffer; and

access the memory using the second physical address.

14. The multi-threaded processor of claim 13 , wherein the memory manager is further configured to store, into the TLB, a page table entry from the prefetch buffer, the page table entry comprising the virtual address and the second physical address.

15. The multi-threaded processor of claim 14 , wherein the memory manager is further configured to delete, from the prefetch buffer, the page table entry comprising the virtual address and the second physical address.

16. The multi-threaded processor of claim 11 , wherein the memory manager is further configured to query the memory for a third physical address corresponding to the virtual address when the virtual address does not exist in the TLB or in the prefetch buffer.

17. The multi-threaded processor of claim 16 , wherein the memory manager is further configured to store, into the TLB, another page table entry from the memory, the another page table entry comprising the virtual address and the third physical address.

18. The multi-threaded processor of claim 11 , wherein the memory manager is further configured to store, into the standby buffer, the page table entries that are not queried within the set time in the TLB.

19. The multi-threaded processor of claim 18 , wherein the memory manager is further configured to delete, from the TLB, the page table entries that are not queried within the set time when a quantity of other page table entries stored in the TLB exceeds a storage capacity of the TLB.

20. The multi-threaded processor of claim 18 , wherein the memory manager is further configured to delete another page table entry with a longest storage time from the standby buffer when a quantity of page table entries stored in the standby buffer exceeds a storage capacity of the standby buffer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2016
From: GUO, XUBIN; HOU, RUI; FENG, YUJING; SU, DONGFENG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 037783/0188 →
Priority Claims (1)
CN 2013 1 0364417 · Aug 20, 2013 · national
Continuity (2)
Continuation PCTCN2014083875 · Aug 7, 2014
Related Publication 20160170904A1 · Jun 16, 2016