# Re: \[PATCH v4\] mm: introduce reference pages

- From: Matthew Wilcox \<willy@infradead.org\>
- Date: 2021-06-29 18:22:47 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/06/6509317
- Thread: https://ratatoskr.run/linux-arm-kernel/2021/06/6508943/t.md

```text
On Tue, Jun 29, 2021 at 10:48:20AM -0700, John Hubbard wrote:
> On 6/29/21 4:58 AM, Matthew Wilcox wrote:
> > int refpage_create(const void *__user content, unsigned int size,
> > 		unsigned long flags);
> > 
> 
> That does seem better. The key is to have at least one more parameter.
> 
> Actually I forgot to include pattern data. In both of the approaches above,
> flags is probably used for that, but if we already know that patterns
> are being passed, then how about add a "pattern" arg? I think it's
> good to leave a little room for flexibility and future extensions:
> 
> int refpage_create(const void *__user content, unsigned int size,
> 		unsigned long pattern, unsigned long flags);

I don't get it.  'size' is the length of the pattern, and it's
pointed to by 'content'.  Why would you pass 'pattern' as well?
```
