Thread (20 messages) flat view 20 messages, 5 authors, 2021-07-20

Re: [PATCH v4] mm: introduce reference pages

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-29 11:59:45
Also in: linux-api, linux-arm-kernel, linux-mm

On Tue, Jun 29, 2021 at 12:19:22AM -0700, John Hubbard wrote:
quoted
+SYSCALL_DEFINE2(refpage_create, const void *__user, content, unsigned long,
+		flags)
From the API discussion (and using a simpler syntax to illustrate this), it
seems like the following would be close:

enum content_type {
	BYTE_PATTERN,
	FOUR_BYTE_PATTERN,
	...
	FULL_4KB_PAGE
};

int refpage_create(const void *__user content, enum content_type, unsigned long flags);

...and if content_type == BYTE_PATTERN, then content is a pointer to just one byte of
data, and so forth for the other enum values.
That seems a little more complicated and non-extensible.

int refpage_create(const void *__user content, unsigned int size,
		unsigned long flags);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help