Re: vdso && f_op->mremap (Was: special_mapping_fault() is broken)

2015-06-23 Thread Oleg Nesterov
On 06/23, Pavel Emelyanov wrote: > > On 06/23/2015 03:47 AM, Oleg Nesterov wrote: > > > Afaics. Still, I think we might want to have special_mapping_remap() > > and we can't do this because ->vm_file == NULL. > > For aio (the single for now mapping with mremap callback) the vm_file > is not NULL.

Re: vdso && f_op->mremap (Was: special_mapping_fault() is broken)

2015-06-23 Thread Pavel Emelyanov
On 06/23/2015 03:47 AM, Oleg Nesterov wrote: > On 06/21, Oleg Nesterov wrote: >> >> Forgot to add Andy... > > Add Pavel ;) > > I never understood why ->mremap() lives in file_operations, not in > vm_operations_struct. To me vma->vm_file->f_op in move_vma() just > looks strange, vma->vm_ops->mrema

Re: vdso && f_op->mremap (Was: special_mapping_fault() is broken)

2015-06-22 Thread Andy Lutomirski
On Mon, Jun 22, 2015 at 5:47 PM, Oleg Nesterov wrote: > On 06/21, Oleg Nesterov wrote: >> >> Forgot to add Andy... > > Add Pavel ;) > > I never understood why ->mremap() lives in file_operations, not in > vm_operations_struct. To me vma->vm_file->f_op in move_vma() just > looks strange, vma->vm_op

Re: vdso && f_op->mremap (Was: special_mapping_fault() is broken)

2015-06-22 Thread Linus Torvalds
On Mon, Jun 22, 2015 at 5:47 PM, Oleg Nesterov wrote: > > In short. Shouldn't we move ->mremap() to vm_operations_struct before > it has another user? We need to fix aio.c, but this is trivial. > > No? Sounds like the right thing to do, but maybe there's some reason I miss that it's the way it is

vdso && f_op->mremap (Was: special_mapping_fault() is broken)

2015-06-22 Thread Oleg Nesterov
On 06/21, Oleg Nesterov wrote: > > Forgot to add Andy... Add Pavel ;) I never understood why ->mremap() lives in file_operations, not in vm_operations_struct. To me vma->vm_file->f_op in move_vma() just looks strange, vma->vm_ops->mremap(new_vma) looks "obviously better". And afaics more useful.