<div dir="ltr">Hi Pavel,<br>Doing echo 4&gt;/proc/pid/clear_refs will do so for all PTEs, right? Here&#39;s what I am doing:<br><br>I do get_user_pages() from driver to pin a user page;<div>I write to this user page from inside the driver (so as part of an ioctl)<br><br>It seems to me that this does not mark the page soft dirty since the write to the page did not happen in user-mode? Also, can I explicitly callĀ <span style="color:rgb(0,0,0)">pte_mksoft_dirty for the pte of interest? Any pointers on this would really help.<br><br>Thanks,</span></div><div><span style="color:rgb(0,0,0)">Divjyot</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 23, 2015 at 4:47 AM, Pavel Emelyanov <span dir="ltr">&lt;<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 09/23/2015 06:27 AM, Divjyot sethi wrote:<br>
&gt; Hello,<br>
&gt; I had a question about setting the soft-dirty bit. Can you please let me know if there<br>
&gt; is a kernel API for setting this.<br>
<br>
</span>No, it&#39;s purely in-kernel thing.<br>
<span class=""><br>
&gt; Basically, from a driver, I am pinning a page in the precess being pre-copied, writing some<br>
&gt; info to it (from driver) and then unpinning the page. My question is that will this<br>
&gt; automatically set the soft-dirty bit for the page? If not, is there an API call for doing so?<br>
<br>
</span>It should do so once you reset the soft dirty with &#39;echo 4 &gt; /proc/pid/clear_refs&#39;.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Pavel<br>
<br>
</font></span></blockquote></div><br></div>