[CRIU] Setting soft-dirty bit...

Divjyot sethi dsethi at princeton.edu
Thu Sep 24 19:20:12 PDT 2015


Also, a followup question: does set_page_dirty also set the soft dirty bit?
If not, would it make sense to extend it?

Thanks,
Divjyot

On Thu, Sep 24, 2015 at 4:27 PM, Divjyot sethi <dsethi at princeton.edu> wrote:

> Hi Pavel,
> Doing echo 4>/proc/pid/clear_refs will do so for all PTEs, right? Here's
> what I am doing:
>
> I do get_user_pages() from driver to pin a user page;
> I write to this user page from inside the driver (so as part of an ioctl)
>
> 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 pte_mksoft_dirty
> for the pte of interest? Any pointers on this would really help.
>
> Thanks,
> Divjyot
>
> On Wed, Sep 23, 2015 at 4:47 AM, Pavel Emelyanov <xemul at parallels.com>
> wrote:
>
>> On 09/23/2015 06:27 AM, Divjyot sethi wrote:
>> > Hello,
>> > I had a question about setting the soft-dirty bit. Can you please let
>> me know if there
>> > is a kernel API for setting this.
>>
>> No, it's purely in-kernel thing.
>>
>> > Basically, from a driver, I am pinning a page in the precess being
>> pre-copied, writing some
>> > info to it (from driver) and then unpinning the page. My question is
>> that will this
>> > automatically set the soft-dirty bit for the page? If not, is there an
>> API call for doing so?
>>
>> It should do so once you reset the soft dirty with 'echo 4 >
>> /proc/pid/clear_refs'.
>>
>> -- Pavel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150924/ce6ca14c/attachment.html>


More information about the CRIU mailing list