Throughout the code, we perform calls to trace_refs on pages in order to see if they reference any other pages, and if so, perform some action for each outgoing reference specific to the context of that piece of the code. When a page has its outgoing references traced, it needs to be loaded from the PageCache in order to call trace_refs on its PageView.
However, this load and call to trace_refs is only necessary in two circumstances:
- The page has never had its outgoing references traced (i.e., it will be the first time
trace_refs is called on the page).
- The page is confirmed to have outgoing references, so we need to call
trace_refs if we want to perform some specific action per traced reference.
If a page is confirmed to have no outgoing references (i.e., we call trace_refs on the page for the first time and see that it yields no outgoing page references), performing this PageCache load is unnecessary, as we will call trace_refs only to perform no further action. Moreover, we need a way to eliminate these redundant loads.
Throughout the code, we perform calls to
trace_refson pages in order to see if they reference any other pages, and if so, perform some action for each outgoing reference specific to the context of that piece of the code. When a page has its outgoing references traced, it needs to be loaded from thePageCachein order to calltrace_refson itsPageView.However, this load and call to
trace_refsis only necessary in two circumstances:trace_refsis called on the page).trace_refsif we want to perform some specific action per traced reference.If a page is confirmed to have no outgoing references (i.e., we call
trace_refson the page for the first time and see that it yields no outgoing page references), performing thisPageCacheload is unnecessary, as we will calltrace_refsonly to perform no further action. Moreover, we need a way to eliminate these redundant loads.