# Re: \[PATCH v1\] madvise.2: Document MADV\_POPULATE\_READ and MADV\_POPULATE\_WRITE

- From: Pankaj Gupta \<pankaj.gupta.linux@gmail.com\>
- Date: 2021-07-12 10:18:05 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/07/6509758
- Thread: https://ratatoskr.run/linux-man/2021/07/6509755/t.md

```text
> >> +.BR MADV_POPULATE_WRITE " (since Linux 5.14)
> >> +Populate (prefault) page tables writable for the whole range without actually
> >> +writing. Depending on the underlying mapping, preallocate memory or read the
> >
> > Is this read or write?
> > just reading and trying to understand :)
>
> It's reading. Assume you have a file with existing content mapped into a
> process. Once you touch a page (read/write/execute) that maps to blocks
> with existing content, you'll have to load these blocks from disk first.

Got it. Thanks for explaining!

Best regards,
Pankaj
```
