* Conceptual difference between VM_CAN_NONLINEAR and VM_NONLINEAR ; path by which VM_NONLINEAR is suppose to be set.
@ 2010-03-05 10:37 Piet Delaney
0 siblings, 0 replies; only message in thread
From: Piet Delaney @ 2010-03-05 10:37 UTC (permalink / raw)
To: linux-mm@kvack.org, Piet Delaney; +Cc: piet delaney
I'm getting a PANIC while working with mmap'd files due to the
VM_NONLINEAR not being set when working with the pte's. I looked quite
a few places and haven't found a clear explanation of how VM_NONLINEAR
differs conceptually from VM_CAN_NONLINEAR. It looks like VM_CAN_NONLINEAR
is suppose to be set earlier and VM_NONLINEAR later when something in
particular is done. I see it set via the remap_file_pages() system call
but not by mmap() via shmem_mmap().
Our open_posix_testsuite/conformance/interfaces/mmap/6-2.test panic is
avoided with by setting VM_NONLINEAR when the file is mapped but I really
doubt this is appropriate as the test runs fine on i386.
------------------------------------------------------------------------
static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
{
file_accessed(file);
vma->vm_ops = &shmem_vm_ops;
#if 1
/* Wrong but didn't panic */
vma->vm_flags |= (VM_CAN_NONLINEAR|VM_NONLINEAR);
#else
/* Right but panics here via LTP posix mmap/6-2.test */
vma->vm_flags |= VM_CAN_NONLINEAR;
#endif
return 0;
}
-------------------------------------------------------------------------
I was hopping this hack would panic the system and that would help explain
why this approach is wrong, but unfortunately it worked.
Could someone take a minute and explain the conceptual difference of
these two vma flags and the path by which the VM_NONLINEAR flag is
suppose to be set.
-piet
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-05 10:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 10:37 Conceptual difference between VM_CAN_NONLINEAR and VM_NONLINEAR ; path by which VM_NONLINEAR is suppose to be set Piet Delaney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.