In function ttm_tt_set_caching<br>,,,,,,,<br><br>    if (ttm-&gt;caching_state == tt_cached)<br> <span style="color:rgb(153,0,0)">      </span><span style="background-color:rgb(255,0,0);color:rgb(255,0,0)"> <span style="background-color:rgb(255,255,255)">drm_clflush_pages(ttm-&gt;pages, ttm-&gt;num_pages);</span></span><br>
<br>    for (i = 0; i &lt; ttm-&gt;num_pages; ++i) {<br>        cur_page = ttm-&gt;pages[i];<br>        if (likely(cur_page != NULL)) {<br>            ret = ttm_tt_set_page_caching(cur_page,<br>                              ttm-&gt;caching_state,<br>
                              c_state);<br>            if (unlikely(ret != 0))<br>                goto out_err;<br>        }<br>    }<br><br>    ttm-&gt;caching_state = c_state;<br><br>    return 0;<br><br><br><span style="background-color:rgb(255,0,0);color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)">drm_clflush_pages<span style="color:rgb(0,0,0)"> flush cache one time.</span><br>
<span style="color:rgb(0,0,0)">then in the following function </span></span></span><span style="color:rgb(255,0,0)">ttm_tt_set_page_caching-&gt;set_memory_wc-&gt;change_page_attr_set: <span style="color:rgb(0,0,0)">in this function may flush page cache again.</span><br style="color:rgb(0,0,0)">
<br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">Does the code do some abundant flush, or there is some trick to these codes?</span><br style="color:rgb(0,0,0)"><br style="color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">Thanks for the answer in advance.</span><br>
</span>