Skip to content

move_pages

Implemented in Antinomie 0.7.0 · Syscall list

long move_pages(pid_t pid, unsigned long nr_pages, const void **pages, const int *nodes, int *status, int flags);
Number (x86-64) 279
ABI 64
Kernel entry point sys_move_pages

This is the raw kernel prototype from the pinned Linux 6.12.94 schema, not the libc wrapper.

Moves pages of a process to given NUMA nodes, or reports the node of each page.

Name Type Meaning
pid (arg0) pid_t Process or thread id.
nr_pages (arg1) unsigned long Number of pages.
pages (arg2) const void ** Pointer to an array of page addresses.
nodes (arg3) const int * Pointer to an array of node numbers.
status (arg4) int * Exit status, or a place to store a status.
flags (arg5) int Option flags that change the behavior of the call.

On success: 0.

In an Antinomie trace the Return column and the ret filter field show the raw kernel return value. On failure that is the negative errno, for example -2 for ENOENT, not the -1 plus errno that the libc wrapper gives. syscall.errno holds the positive errno and syscall.success is false.

Raw return Name Meaning
-14 EFAULT A pointer argument points outside the accessible address space.
-1 EPERM The operation is not permitted for this process.

move_pages(2) on man7.org

Coverage mark: Implemented. Every pointer argument has a capture rule in the pinned kernel patch and none of them records a “no decoder”, “address only” or “not observed” gap on any code path. Individual values can still be incomplete on a particular call; see the capture statuses.

Every call is recorded as an Entry record (the six argument words and the pointees copied at entry) and an Exit record (the return value and the pointees copied at exit).

Argument When How Recorded field key Condition
pid (arg0) Entry raw scalar word args.0, args.pid
nr_pages (arg1) Entry raw scalar word args.1, args.nr_pages
pages (arg2) Entry the pointer itself, as a raw word args.2, args.raw[2]
↳ pointee Entry array of page addresses (8 bytes each), count nr_pages (arg1) move_pages.array always
nodes (arg3) Entry the pointer itself, as a raw word args.3, args.raw[3]
↳ pointee Entry array of target nodes (4 bytes each), count nr_pages (arg1) move_pages.array the nodes pointer is not NULL
status (arg4) Entry the pointer itself, as a raw word args.4, args.raw[4]
↳ pointee Exit array of status values (4 bytes each), count nr_pages (arg1) move_pages.array result is 0 or greater
flags (arg5) Entry raw scalar word; Syscall Trace also decodes it into flag names (mbind group), listing unknown bits separately args.5, args.flags
  • Result: ret, syscall.errno, syscall.success, syscall.duration_ns.
  • Argument words: args.pid (arg0), args.nr_pages (arg1), args.pages (arg2), args.nodes (arg3), args.status (arg4), args.flags (arg5); args.0 to args.5 by position.
  • Structure wait_status behind nodes (arg3): args.nodes.<member> for value.
  • Structure wait_status behind status (arg4): args.status.<member> for value.

See Syscall Trace filter for the full syntax.

For what the capture statuses mean, see Capture statuses. For what is never recorded, see Known gaps.