Re: [PATCH 0/5] Add process_memwatch syscall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Peter.Enderborg@xxxxxxxx" <Peter.Enderborg@xxxxxxxx> writes:
>>
>> This syscall can be used by the CRIU project and other applications which
>> require soft-dirty PTE bit information. The following operations are
>> supported in this syscall:
>> - Get the pages that are soft-dirty.
>> - Clear the pages which are soft-dirty.
>> - The optional flag to ignore the VM_SOFTDIRTY and only track per page
>> soft-dirty PTE bit
>>

Hi Peter,

(For context, I wrote a previous version of this patch and have been
working with Usama on the current patch).

> Why can it not be done as a IOCTL?

Considering an ioctl is basically a namespaced syscall with extra-steps,
surely we can do it :) There are a few reasons we haven't, though:

1) ioctl auditing/controling is much harder than syscall

2) There is a concern for performance, since this might be executed
frequently by windows applications running over wine.  There is an extra
cost with unnecessary copy_[from/to]_user that we wanted to avoid, even
though we haven't measured.

3) I originally wrote this at the time process_memadvise was merged.  I
felt it fits the same kind of interface exposed by
process_memadvise/process_mrelease,  recently merged.

4) Not obvious whether the ioctl would be against pagemap/clear_refs.
Neither file name describes both input and output semantics.

Obviously, all of those reasons can be worked around, and we can turn
this into an ioctl.

Thanks,

-- 
Gabriel Krisman Bertazi



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux