Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-07 Thread Jarkko Sakkinen
On Mon, Mar 07, 2022 at 03:16:57PM +0200, Jarkko Sakkinen wrote: > On Sun, Mar 06, 2022 at 10:43:31PM +, Matthew Wilcox wrote: > > On Sun, Mar 06, 2022 at 07:02:57PM +0200, Jarkko Sakkinen wrote: > > > So can I conclude from this that in general having populate available for > > > device memory

Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-07 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 10:43:31PM +, Matthew Wilcox wrote: > On Sun, Mar 06, 2022 at 07:02:57PM +0200, Jarkko Sakkinen wrote: > > So can I conclude from this that in general having populate available for > > device memory is something horrid, or just the implementation path? > > You haven't e

Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-06 Thread Matthew Wilcox
On Sun, Mar 06, 2022 at 07:02:57PM +0200, Jarkko Sakkinen wrote: > So can I conclude from this that in general having populate available for > device memory is something horrid, or just the implementation path? You haven't even attempted to explain what the problem is you're trying to solve. You'

Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-06 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 07:03:00PM +0200, Jarkko Sakkinen wrote: > On Sun, Mar 06, 2022 at 11:01:36AM +0100, Greg Kroah-Hartman wrote: > > On Sun, Mar 06, 2022 at 07:32:05AM +0200, Jarkko Sakkinen wrote: > > > Sometimes you might want to use MAP_POPULATE to ask a device driver to > > > initialize t

Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-06 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 11:01:36AM +0100, Greg Kroah-Hartman wrote: > On Sun, Mar 06, 2022 at 07:32:05AM +0200, Jarkko Sakkinen wrote: > > Sometimes you might want to use MAP_POPULATE to ask a device driver to > > initialize the device memory in some specific manner. SGX driver can use > > this to

Re: [PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-06 Thread Greg Kroah-Hartman
On Sun, Mar 06, 2022 at 07:32:05AM +0200, Jarkko Sakkinen wrote: > Sometimes you might want to use MAP_POPULATE to ask a device driver to > initialize the device memory in some specific manner. SGX driver can use > this to request more memory by issuing ENCLS[EAUG] x86 opcode for each > page in the

[PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
Sometimes you might want to use MAP_POPULATE to ask a device driver to initialize the device memory in some specific manner. SGX driver can use this to request more memory by issuing ENCLS[EAUG] x86 opcode for each page in the address range. Add f_ops->populate() with the same parameters as f_ops-