Sensing data access method based on substrate management controller and substrate management controller
By using the lock unlocking mechanism of the recording area and buffer in the substrate management controller, the problem of storage failure when updating the sensed data is solved, the stability of data updates and the reliability of the system are achieved, and the risk of overdue is reduced.
Patent Information
- Application Number
- CN202310498192.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2024-11-05
AI Technical Summary
When the existing server substrate management controller updates the sense data, if the components read shared memory at the same time, it is easy to cause storage failure. Due to the long-term locking of shared memory, it may cause system misjudgment abnormalities and time-out problems.
By allocating the record area and buffer in the storage module, and marking the record area as locked when updating the sensed data, copying the latest data to the buffer, avoiding reading requests until all data updates are completed before unlocking. Make sure the read request gets the latest data from the buffer.
It effectively avoids storage failures, shortens the time to wait for the sensor to return to the sensing data, reduces the occurrence of time-out situations, and ensures the stability of data updates and the reliability of the system.
Smart Images

Figure CN118897645A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a structure of a programmable calculator with a general storage function, and in particular to a sensing data access method based on a baseboard management controller and a baseboard management controller. Background Art
[0002] The existing server includes a baseboard management controller (BMC), which collects multiple sensing data from multiple sensors, such as temperature sensors, voltage sensors, current sensors, etc. The baseboard management controller updates the sensing data to a shared memory (SHM) of the baseboard management controller. However, if other components read the shared memory at the same time during the process of updating the sensing data, storage failure will occur. Summary of the invention
[0003] The object of the present invention is to provide a sensing data access method based on a baseboard management controller which can avoid storage failure.
[0004] The present invention is based on a sensing data access method of a baseboard management controller, which is suitable for managing the sensing data of multiple sensors. The baseboard management controller includes a storage module and a processing module electrically connected to the storage module. The storage module stores multiple sensing data corresponding to the sensors respectively. The method includes the following steps.
[0005] (A) The processing module divides the storage space of the storage module into a recording area and a buffer area, the recording area and the buffer area store the sensing data, and the recording area and the buffer area can be marked by the processing module between a locked state and an unlocked state. When marked as the locked state, the processing module does not respond to a read request, and when marked as the unlocked state, the processing module responds to a read request.
[0006] (B) The processing module replaces and updates the corresponding sensing data stored in the recording area with a plurality of latest sensing data generated after the sensing data and respectively coming from the sensors.
[0007] (C) The processing module marks the recording area and the buffer area as the locked state.
[0008] (D) The processing module copies the latest sensing data in the recording area to the buffer to replace and update the corresponding sensing data stored in the buffer.
[0009] (E) The processing module marks the recording area and the buffer area as the unlocked state. Preferably, the sensing data access method based on the baseboard management controller of the present invention, step (A) includes the following sub-steps:
[0010] (A-1) the processing module divides the storage space of the storage module into the recording area and the buffer area;
[0011] (A-2) the processing module initializes the recording area by default so that the recording area stores the sensing data; and
[0012] (A-3) The processing module copies the sensing data stored in the recording area to the buffer area.
[0013] Preferably, in the sensing data access method based on the baseboard management controller of the present invention, the storage module also stores a plurality of sensor names corresponding to the sensors respectively, in sub-step (A-2), the recording area also stores the sensor names, and in sub-step (A-3), the processing module also copies the sensor names stored in the recording area to the buffer.
[0014] Preferably, in the sensing data access method based on the baseboard management controller of the present invention, step (B) comprises the following sub-steps:
[0015] (B-1) the processing module marks the recording area as the locked state;
[0016] (B-2) the processing module obtains one of the latest sensing data from one of the sensors;
[0017] (B-3) the processing module replaces and updates the target sensing data corresponding to the one of the sensors in the sensing data stored in the recording area according to the one of the latest sensing data;
[0018] (B-4) the processing module marks the recording area as the unlocked state; and
[0019] (B-5) Repeat sub-steps (B-1) to (B-4) until the processing module updates all the sensing data in the recording area.
[0020] Another object of the present invention is to provide a baseboard management controller that can avoid storage failure.
[0021] The baseboard management controller of the present invention is suitable for managing sensing data of multiple sensors, and comprises a storage module and a processing module electrically connected to the storage module.
[0022] The storage module includes a recording area and a buffer area, wherein the recording area and the buffer area store a plurality of sensing data respectively corresponding to the sensors.
[0023] The recording area and the buffer can be marked by the processing module between a locked state and an unlocked state. When marked as the locked state, the processing module does not respond to a read request. When marked as the unlocked state, the processing module responds to a read request. The processing module replaces and updates the corresponding sensing data stored in the recording area with a plurality of latest sensing data generated after the sensing data and respectively coming from the sensors. After marking the recording area and the buffer as the locked state, the processing module copies the latest sensing data of the recording area to the buffer to replace and update the corresponding sensing data stored in the buffer, and then marks the recording area and the buffer as the unlocked state.
[0024] Preferably, in the baseboard management controller of the present invention, the processing module divides the storage space of the storage module into the recording area and the buffer area, and initializes the recording area by default so that the recording area stores the sensing data, and then copies the sensing data stored in the recording area to the buffer area.
[0025] Preferably, the baseboard management controller of the present invention, when the processing module initializes the recording area by default, also enables the recording area to store a plurality of sensor names corresponding to the sensors respectively, and the processing module also copies the sensor names stored in the recording area to the buffer.
[0026] Preferably, in the baseboard management controller of the present invention, the processing module marks the recording area as the locked state, and obtains the latest sensing data corresponding to one of the sensors from one of the sensors, then updates the target sensing data corresponding to one of the sensors in the sensing data stored in the recording area to the latest sensing data, and marks the recording area as the unlocked state, and repeats the above actions until all the sensing data in the recording area are updated.
[0027] Another object of the present invention is to provide a sensing data access method based on a baseboard management controller that can avoid storage failure.
[0028] The present invention is based on a sensing data access method of a baseboard management controller, which is suitable for managing the sensing data of multiple sensors. The baseboard management controller includes a storage module and a processing module electrically connected to the storage module. The storage space of the storage module includes a recording area and a buffer area. It is characterized in that: the method includes the following steps: a step (A), a step (B), a step (C), a step (D), and a step (E).
[0029] (A) The processing module stores a plurality of sensing data respectively from the sensors in the recording area of the storage module.
[0030] (B) the processing module stores a plurality of latest sensing data generated after the sensing data and respectively coming from the sensor in the recording area to replace and update the corresponding sensing data stored in the recording area in step (A);
[0031] (C) after the sensing data stored in the recording area is updated to the latest sensing data, the processing module copies all the latest sensing data to the buffer of the storage module;
[0032] (D) the processing module receives a request to read at least one of the sensing data of the sensor; and
[0033] (E) The processing module obtains the corresponding latest sensing data from the buffer to respond to the request.
[0034] Another object of the present invention is to provide a baseboard management controller that can avoid storage failure.
[0035] The baseboard management controller of the present invention is suitable for managing the access of sensing data of multiple sensors, and comprises a storage module and a processing module electrically connected to the storage module.
[0036] The storage space of the storage module includes a recording area and a buffer area, the recording area stores a plurality of sensing data corresponding to the sensors respectively, and the sensing data will be updated to a plurality of latest sensing data generated after the sensing data and corresponding to the sensors respectively, and the buffer area stores a copy of the content after all the sensing data in the recording area are updated to the latest sensing data, and the processing module responds to the read request.
[0037] The processing module is used for obtaining the corresponding latest sensing data from the buffer to respond to the request after receiving a request to read at least one of the sensing data of the sensor.
[0038] The beneficial effect of the present invention is that the storage space of the storage module includes the recording area and the buffer area, both the buffer area and the recording area store the latest sensing data, and when the recording area is accessed, the latest sensing data can be obtained from the buffer area to avoid storage failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a block diagram illustrating an embodiment of a baseboard management controller of the present invention;
[0040] Figure 2 is a flow chart illustrating an embodiment of a sensing data access method based on a baseboard management controller of the present invention;
[0041] Figure 3 This is a flow chart to help explain Figure 2 Sub-steps of step 21; and
[0042] Figure 4 This is a flow chart to help explain Figure 2 Sub-steps of step 22. DETAILED DESCRIPTION
[0043] Before the present invention is described in detail, it should be noted that similar components are denoted by the same reference numerals in the following description.
[0044] See also Figure 1 , illustrates an embodiment of a baseboard management controller 1 of the present invention, which is suitable for managing sensing data of N sensors 2. The baseboard management controller 1 is communicatively connected to an IPMI tool 3, including a storage module 11, and a processing module 12 electrically connected to the storage module 11, wherein N>1.
[0045] The storage module 11 is, for example, a memory, including a recording area 111 and a buffer area 112. The recording area 111 and the buffer area 112 store N sensing data corresponding to the sensor 2, and N sensor names corresponding to the sensor 2. The sensing data and the sensor name stored in the buffer area 112 are copies of the sensing data and the sensor name stored in the recording area 111. The recording area 111 and the buffer area 112 can be marked by the processing module 12 between a locked state and an unlocked state. In the locked state, the processing module 12 does not respond to a read request; in the unlocked state, the processing module 12 does not respond to a read request. In other words, when the recording area 111 or the buffer area 112 is marked as the locked state, other components cannot obtain a response from the processing module 12 regarding reading the recording area 111 or the buffer area 112.
[0046] It is worth noting that the sensing data is, for example, the reading value of the sensor 2. In other embodiments, the recording area 111 and the buffer 112 may not store the sensor name, and the recording area 111 and the buffer 112 are not limited to being marked as the locked state or the unlocked state, but are not limited thereto.
[0047] See also Figure 1 , 2 ,illustrate Figure 1 How does the baseboard management controller 1 perform Figure 2The present invention is based on an embodiment of a sensing data access method of a baseboard management controller, and the steps included in the embodiment are described in detail below.
[0048] In step 21 , the processing module 12 divides the storage space of the storage module 11 into the recording area 111 and the buffer area 112 . The recording area 111 and the buffer area 112 store the sensing data and the sensor name.
[0049] It should be noted that in other implementations, step 21 may not be included because the storage module 11 may have configured the recording area 111 and the buffer area 112 by default, but the present invention is not limited thereto.
[0050] Matching reference Figure 3 Step 21 includes sub-steps 211 to 213. The sub-steps included in step 21 are described below.
[0051] In sub-step 211 , the processing module 12 divides the storage space of the storage module 11 into the recording area 111 and the buffer area 112 .
[0052] In sub-step 212 , the processing module 12 initializes the recording area 111 by default, so that the recording area 111 stores the sensing data and the sensor name.
[0053] In sub-step 213 , the processing module 12 copies the sensing data and the sensor name stored in the recording area 111 to the buffer 112 .
[0054] It should be noted that in other embodiments, in sub-step 212 , the processing module 12 may only store the sensing data, and in sub-step 213 , the processing module 12 may only copy the sensing data stored in the recording area 111 to the buffer 112 , but the present invention is not limited thereto.
[0055] In step 22 , the processing module 12 replaces and updates the corresponding sensing data stored in the recording area 111 with N pieces of latest sensing data generated after the sensing data and respectively coming from the sensor 2 .
[0056] Matching reference Figure 4 Step 22 includes sub-steps 221 to 227. The sub-steps included in step 22 are described below.
[0057] In sub-step 221 , initially, the processing module 12 is for the first sensor 2 , that is, i=1.
[0058] In sub-step 222 , the processing module 12 marks the recording area 111 as the locked state.
[0059] In sub-step 223 , the processing module 12 obtains the latest sensing data from the i-th sensor 2 .
[0060] In sub-step 224 , the processing module 12 replaces and updates the target sensing data corresponding to the i-th sensor 2 in the sensing data stored in the recording area 111 according to the latest sensing data.
[0061] In sub-step 225 , the processing module 12 marks the recording area 111 as the unlocked state.
[0062] In sub-step 226 , it is determined whether the sensor 2 is the Nth sensor 2 , that is, it is determined whether i=N. When it is determined that i=N, the process proceeds to step 23 ; and when it is determined that i≠N, the process proceeds to sub-step 227 .
[0063] In sub-step 227 , the processing module 12 repeats sub-step 222 for the i+1th sensor 2 , that is, i=i+1.
[0064] In step 23 , the processing module 12 marks the recording area 111 and the buffer area 112 as being in the locked state.
[0065] In step 24 , the processing module 12 copies the latest sensing data in the recording area 111 to the buffer 112 to replace and update the corresponding sensing data stored in the buffer 112 .
[0066] In step 25 , the processing module 12 marks the recording area 111 and the buffer area 112 as being in the unlocked state.
[0067] It should be noted that in other implementations where the recording area 111 and the buffer area 112 are not restricted to be marked with the locked state or the unlocked state, step 22 does not include sub-step 222 and sub-step 225 , and does not include step 23 and step 25 .
[0068] In step 26 , the processing module 12 receives a request to read at least one of the sensing data of the sensor 2 .
[0069] It should be noted that, in this embodiment, the request comes from the IPMI tool, for example, but not limited thereto.
[0070] In step 27 , the processing module 12 marks the buffer 112 as the locked state.
[0071] In step 28 , the processing module 12 obtains the corresponding latest sensing data from the buffer 112 to respond to the request.
[0072] In step 29 , the processing module 12 marks the buffer 112 as the unlocked state.
[0073] It is worth noting that in other implementations where the recording area 111 and the buffer area 112 are not restricted to be marked as the locked state or the unlocked state, step 22 does not include sub-step 222 and sub-step 225, and does not include step 23, step 25, step 27, and step 29.
[0074] It should be noted that when an existing baseboard management controller updates sensing data, a mutual exclusion mechanism (Mutex) can also be enabled to lock a shared memory of the baseboard management controller, and the baseboard management controller does not respond to any component's read request to avoid storage failure. However, when a user uses an external tool, such as an Intelligent Platform Management Interface tool (hereinafter referred to as IPMI tool), to read the sensing data in the shared memory, if the baseboard management controller locks the shared memory when updating the sensing data and does not respond to the read request, the shared memory cannot be read for a certain period of time due to the preset timeout mechanism of the tool itself, which may cause the system to misjudge an abnormality. However, the baseboard management controller issues instructions to multiple sensors one by one, waits for the sensors to send back sensing data, and then updates the received sensing data one by one, which is very time-consuming, making the shared memory locked for a very long time, and it is difficult to avoid the occurrence of timeouts.
[0075] In summary, the present invention is based on the sensing data access method of the baseboard management controller and the baseboard management controller. The storage space of the storage module 11 includes the recording area 111 and the buffer area 112. The recording area 111 and the buffer area 112 both store the latest sensing data. When the recording area 111 is accessed, the latest sensing data can be obtained from the buffer area 112 to avoid storage failure. In addition, it is only necessary to wait for the sensing data in the recording area 111 to be updated to the latest sensing data, and then copy the latest sensing data to the buffer area 112 at one time. The buffer area 112 greatly shortens the locking time due to waiting for the sensor 2 to return the sensing data one by one, so as to greatly reduce the occurrence of timeouts, so the purpose of the present invention can be achieved.
[0076] The above are merely embodiments of the present invention and should not be used to limit the scope of the present invention. That is, any simple equivalent changes and modifications made according to the claims and description of the present invention still fall within the scope of the present invention.
Claims
1. A sensing data access method based on a baseboard management controller, suitable for managing sensing data of a plurality of sensors (2), the baseboard management controller comprising a storage module (11) and a processing module (12) electrically connected to the storage module (11), the storage module (11) storing a plurality of sensing data corresponding to the sensors (2), characterized in that: The method comprises the following steps: (A) the processing module (12) divides the storage space of the storage module (11) into a recording area (111) and a buffer area (112), the recording area (111) and the buffer area (112) store the sensing data, and the recording area (111) and the buffer area (112) can be marked by the processing module (12) between a locked state and an unlocked state, when marked as the locked state, the processing module (12) does not respond to a read request, and when marked as the unlocked state, the processing module (12) responds to a read request; (B) the processing module (12) replaces and updates the corresponding sensing data stored in the recording area (111) with a plurality of latest sensing data generated after the sensing data and respectively coming from the sensor (2); (C) the processing module (12) marks the recording area (111) and the buffer area (112) as the locked state; (D) the processing module (12) copies the latest sensing data in the recording area (111) to the buffer (112) to replace and update the corresponding sensing data stored in the buffer (112); and (E) The processing module (12) marks the recording area (111) and the buffer area (112) as the unlocked state.
2. The sensing data access method based on baseboard management controller according to claim 1, characterized in that: Step (A) comprises the following sub-steps: (A-1) the processing module divides the storage space of the storage module into the recording area and the buffer area; (A-2) the processing module initializes the recording area by default so that the recording area stores the sensing data; and (A-3) The processing module copies the sensing data stored in the recording area to the buffer area.
3. The sensing data access method based on the baseboard management controller according to claim 2, wherein the storage module further stores a plurality of sensor names corresponding to the sensors respectively, wherein: In sub-step (A-2), the recording area also stores the sensor name, and in sub-step (A-3), the processing module also copies the sensor name stored in the recording area to the buffer.
4. The sensing data access method based on baseboard management controller according to claim 1, characterized in that: Step (B) comprises the following sub-steps: (B-1) the processing module marks the recording area as the locked state; (B-2) the processing module obtains one of the latest sensing data from one of the sensors; (B-3) the processing module replaces and updates the target sensing data corresponding to the one of the sensors in the sensing data stored in the recording area according to the one of the latest sensing data; (B-4) the processing module marks the recording area as the unlocked state; and (B-5) Repeat sub-steps (B-1) to (B-4) until the processing module updates all the sensing data in the recording area.
5. A baseboard management controller (1), adapted to manage sensing data of a plurality of sensors (2), characterized in that: Include: A storage module (11) comprises a recording area (111) and a buffer area (112), wherein the recording area (111) and the buffer area (112) store a plurality of sensing data corresponding to the sensor (2); and A processing module (12), electrically connected to the storage module (11); The recording area (111) and the buffer area (112) can be marked by the processing module (12) between a locked state and an unlocked state. When the recording area (111) and the buffer area (112) are marked as the locked state, the processing module (12) does not respond to a read request. When the recording area (111) and the buffer area (112) are marked as the unlocked state, the processing module (12) responds to a read request. The processing module (12) replaces and updates the corresponding sensing data stored in the recording area (111) with the latest sensing data generated after the sensing data and respectively coming from the sensor (2). The processing module (12) stores the latest sensing data in the recording area (111) in the recording area (111) to update the historical sensing data stored in the recording area (111). After marking the recording area (111) and the buffer area (112) as the locked state, the processing module (12) copies the latest sensing data in the recording area (111) to the buffer area (112) to replace and update the corresponding sensing data stored in the buffer area (112), and then marks the recording area (111) and the buffer area (112) as the unlocked state.
6. The baseboard management controller according to claim 5, characterized in that: The processing module divides the storage space of the storage module into the recording area and the buffer area, initializes the recording area by default so that the recording area stores the sensing data, and then copies the sensing data stored in the recording area to the buffer area.
7. The baseboard management controller according to claim 6, characterized in that: When the processing module initializes the recording area by default, the recording area is also enabled to store a plurality of sensor names corresponding to the sensors respectively, and the processing module further copies the sensor names stored in the recording area to the buffer.
8. The baseboard management controller according to claim 5, characterized in that: The processing module marks the recording area as the locked state, obtains the latest sensing data corresponding to one of the sensors from one of the sensors, updates the target sensing data corresponding to one of the sensors in the sensing data stored in the recording area to the latest sensing data, marks the recording area as the unlocked state, and repeats the above actions until all the sensing data in the recording area are updated.
9. A sensing data access method based on a baseboard management controller, suitable for managing sensing data of a plurality of sensors (2), the baseboard management controller (1) comprising a storage module (11) and a processing module (12) electrically connected to the storage module (11), characterized in that: The method comprises the following steps: (A) the processing module (12) stores a plurality of sensing data respectively from the sensor (2) in the recording area (111) of the storage module (11); (B) the processing module (12) stores a plurality of latest sensing data generated after the sensing data and respectively coming from the sensor (2) in the recording area (111), so as to replace and update the corresponding sensing data stored in the recording area (111) in step (A); (C) after the sensing data stored in the recording area (111) is updated to the latest sensing data, the processing module (12) copies all the latest sensing data to the buffer (112) of the storage module (11); (D) the processing module (12) receives a request to read at least one of the sensing data of the sensor (2); and (E) The processing module (12) obtains the corresponding latest sensing data from the buffer (112) to respond to the request.
10. A baseboard management controller (1) adapted to manage access to sensing data of a plurality of sensors (2), characterized in that: Include: A storage module (11), wherein the storage space of the storage module (11) includes a recording area (111) and a buffer area (112), wherein the recording area (111) stores a plurality of sensing data corresponding to the sensor (2), and the sensing data will be updated to a plurality of latest sensing data generated after the sensing data and corresponding to the sensor (2), and the buffer area (112) stores a copy of the content of all the sensing data in the recording area (111) after being updated to the latest sensing data; and A processing module (12) is electrically connected to the storage module (11), and is used for, upon receiving a request to read at least one of the sensing data of the sensor (2), obtaining the corresponding latest sensing data from the buffer (112) to respond to the request.
