Raymond Raymond wrote:
If the background I/O thread can refer to this list.I think it can help solve the problem you mentioned. I am not very familiar with the background I/O thread. If I am wrong, please point it out.
As I said in the previous email: This is NOT a good idea! The background writer should focus on writing out pages that are candidates for replacement.
In the list, the dirt pages are sorted in ascending order of the time when they were firt updated, which means the oldest dirty page is in the head of the list and the latest updated dirty page is in the end of the list. The operations on the list are : - When a page is updated and it is not in the list, we will append it to the end of the list.
You have to be a bit careful here. I do not think there is a guarantee that the order operations are executed, reflect the order of their log records. Hence, you may be prepared to search from the end of the list and forward to find the correct position. However, you will normally insert it very close to the end of the list.
- When a dirty page in the list is written out to disk, it will be released from the list.
-- Øystein
