[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tu6kghvw.fsf@collabora.com>
Date: Wed, 10 Aug 2022 12:53:07 -0400
From: Gabriel Krisman Bertazi <krisman@...labora.com>
To: Peter.Enderborg@...y.com
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
Jonathan Corbet <corbet@....net>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Shuah Khan <shuah@...nel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:PROC FILESYSTEM" <linux-fsdevel@...r.kernel.org>,
"open list:ABI/API" <linux-api@...r.kernel.org>,
"open list:GENERIC INCLUDE/ASM HEADER FILES"
<linux-arch@...r.kernel.org>,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
"open list:PERFORMANCE EVENTS SUBSYSTEM"
<linux-perf-users@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
"kernel@...labora.com" <kernel@...labora.com>
Subject: Re: [PATCH 0/5] Add process_memwatch syscall
"Peter.Enderborg@...y.com" <Peter.Enderborg@...y.com> 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
Powered by blists - more mailing lists