Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-11-01 Thread Jaya Kumar
On Oct 30, 2007 11:47 AM, Hugh Dickins <[EMAIL PROTECTED]> wrote: > > I don't understand why you suggested an anon_vma, nor why Jaya is > suggesting a private list. All vmas mapping /dev/fb0 will be kept > in the prio_tree rooted in its struct address_space (__vma_link_file > in mm/mmap.c). And

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-11-01 Thread Jaya Kumar
On Oct 30, 2007 11:47 AM, Hugh Dickins [EMAIL PROTECTED] wrote: I don't understand why you suggested an anon_vma, nor why Jaya is suggesting a private list. All vmas mapping /dev/fb0 will be kept in the prio_tree rooted in its struct address_space (__vma_link_file in mm/mmap.c). And

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Hugh Dickins
On Tue, 30 Oct 2007, Peter Zijlstra wrote: > On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: ... > > - defio mmap adds this vma to private list (equivalent of > > address_space or anon_vma) ... > > - foreach vma { foreach page { page_mkclean_one(page, vma) } > > Yeah, page_mkclean_one(page,

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 15:47 +, Hugh Dickins wrote: > On Tue, 30 Oct 2007, Peter Zijlstra wrote: > > On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: > > > > - defio mmap adds this vma to private list (equivalent of > > > address_space or anon_vma) > > > > - foreach vma { foreach

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: > On 10/30/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > So page->index does what you want it to, identify which part of the > > framebuffer this particular page belongs to. > > Ok. I'm attempting to walk the code sequence. Here's what I

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Jaya Kumar
On 10/30/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > So page->index does what you want it to, identify which part of the > framebuffer this particular page belongs to. Ok. I'm attempting to walk the code sequence. Here's what I think: - driver loads - driver vmalloc()s its fb - this creates

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 12:39 +, Hugh Dickins wrote: > On Tue, 30 Oct 2007, Stefani Seibold wrote: > > > > the question is how can i get all pte's from a vmalloc'ed memory. Due to > > the zeroed mapping pointer i dont see how to do this? > > The mapping pointer is zeroed because you've done

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Hugh Dickins
On Tue, 30 Oct 2007, Stefani Seibold wrote: > > the question is how can i get all pte's from a vmalloc'ed memory. Due to > the zeroed mapping pointer i dont see how to do this? The mapping pointer is zeroed because you've done nothing to set it. Below is how I answered you a week ago. But this

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Stefani Seibold
Hi, the question is how can i get all pte's from a vmalloc'ed memory. Due to the zeroed mapping pointer i dont see how to do this? Am Dienstag, den 30.10.2007, 10:56 +0100 schrieb Peter Zijlstra: > On Mon, 2007-10-29 at 21:22 -0400, Jaya Kumar wrote: > > On 10/29/07, Peter Zijlstra <[EMAIL

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Mon, 2007-10-29 at 21:22 -0400, Jaya Kumar wrote: > On 10/29/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > [ also, remap_vmalloc_range() suffers similar issues, only file and anon > > have proper rmap ] > > > > I'm not sure we want full rmap for remap_pfn/vmalloc_range, but perhaps >

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Mon, 2007-10-29 at 21:22 -0400, Jaya Kumar wrote: On 10/29/07, Peter Zijlstra [EMAIL PROTECTED] wrote: [ also, remap_vmalloc_range() suffers similar issues, only file and anon have proper rmap ] I'm not sure we want full rmap for remap_pfn/vmalloc_range, but perhaps we could

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Stefani Seibold
Hi, the question is how can i get all pte's from a vmalloc'ed memory. Due to the zeroed mapping pointer i dont see how to do this? Am Dienstag, den 30.10.2007, 10:56 +0100 schrieb Peter Zijlstra: On Mon, 2007-10-29 at 21:22 -0400, Jaya Kumar wrote: On 10/29/07, Peter Zijlstra [EMAIL

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Hugh Dickins
On Tue, 30 Oct 2007, Stefani Seibold wrote: the question is how can i get all pte's from a vmalloc'ed memory. Due to the zeroed mapping pointer i dont see how to do this? The mapping pointer is zeroed because you've done nothing to set it. Below is how I answered you a week ago. But this is

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 12:39 +, Hugh Dickins wrote: On Tue, 30 Oct 2007, Stefani Seibold wrote: the question is how can i get all pte's from a vmalloc'ed memory. Due to the zeroed mapping pointer i dont see how to do this? The mapping pointer is zeroed because you've done nothing to

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Jaya Kumar
On 10/30/07, Peter Zijlstra [EMAIL PROTECTED] wrote: So page-index does what you want it to, identify which part of the framebuffer this particular page belongs to. Ok. I'm attempting to walk the code sequence. Here's what I think: - driver loads - driver vmalloc()s its fb - this creates the

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: On 10/30/07, Peter Zijlstra [EMAIL PROTECTED] wrote: So page-index does what you want it to, identify which part of the framebuffer this particular page belongs to. Ok. I'm attempting to walk the code sequence. Here's what I think: -

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Hugh Dickins
On Tue, 30 Oct 2007, Peter Zijlstra wrote: On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: ... - defio mmap adds this vma to private list (equivalent of address_space or anon_vma) ... - foreach vma { foreach page { page_mkclean_one(page, vma) } Yeah, page_mkclean_one(page, vma) will

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-30 Thread Peter Zijlstra
On Tue, 2007-10-30 at 15:47 +, Hugh Dickins wrote: On Tue, 30 Oct 2007, Peter Zijlstra wrote: On Tue, 2007-10-30 at 09:16 -0400, Jaya Kumar wrote: - defio mmap adds this vma to private list (equivalent of address_space or anon_vma) - foreach vma { foreach page {

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > [ also, remap_vmalloc_range() suffers similar issues, only file and anon > have proper rmap ] > > I'm not sure we want full rmap for remap_pfn/vmalloc_range, but perhaps > we could assist drivers in maintaining and using vma lists. > > I

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 19:17 +0100, Peter Zijlstra wrote: > On Mon, 2007-10-29 at 13:51 -0400, Jaya Kumar wrote: > > On 10/29/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > > > > An aside, I just tested that deferred IO works fine on

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 13:51 -0400, Jaya Kumar wrote: > On 10/29/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > > > An aside, I just tested that deferred IO works fine on 2.6.22.10/pxa255. > > > > > > I understood from the thread that PeterZ

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > > An aside, I just tested that deferred IO works fine on 2.6.22.10/pxa255. > > > > I understood from the thread that PeterZ is looking into page_mkclean > > changes which I guess went

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > On 10/29/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL PROTECTED]> > > wrote: > > > > > > The problem original occurs with the fb_defio driver > > > (driver/video/fb_defio.c). > >

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Nick Piggin
On Monday 29 October 2007 23:35, Peter Zijlstra wrote: > On Mon, 2007-10-29 at 11:11 +0100, Peter Zijlstra wrote: > > On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > > > On 10/29/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 11:11 +0100, Peter Zijlstra wrote: > On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > > On 10/29/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > > On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > The problem original

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: > On 10/29/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL PROTECTED]> > > wrote: > > > > > > The problem original occurs with the fb_defio driver > > > (driver/video/fb_defio.c). > >

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL PROTECTED]> wrote: > > > > The problem original occurs with the fb_defio driver > > (driver/video/fb_defio.c). > > This driver use the vm_ops.page_mkwrite() handler for tracking the

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Andrew Morton
On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold <[EMAIL PROTECTED]> wrote: > Hi, > > i have a problem with vmalloc() and vm_ops.page_mkwrite(). > > ReadOnly access works, but on a write access the VM will > endless invoke the vm_ops.page_mkwrite() handler. > > I tracked down the problem to

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Andrew Morton
On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED] wrote: Hi, i have a problem with vmalloc() and vm_ops.page_mkwrite(). ReadOnly access works, but on a write access the VM will endless invoke the vm_ops.page_mkwrite() handler. I tracked down the problem to the

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED] wrote: The problem original occurs with the fb_defio driver (driver/video/fb_defio.c). This driver use the vm_ops.page_mkwrite() handler for tracking the modified

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: On 10/29/07, Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED] wrote: The problem original occurs with the fb_defio driver (driver/video/fb_defio.c). This driver use

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 11:11 +0100, Peter Zijlstra wrote: On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: On 10/29/07, Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED] wrote: The problem original occurs with the

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Nick Piggin
On Monday 29 October 2007 23:35, Peter Zijlstra wrote: On Mon, 2007-10-29 at 11:11 +0100, Peter Zijlstra wrote: On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: On 10/29/07, Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED]

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: On 10/29/07, Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 22 Oct 2007 16:40:57 +0200 Stefani Seibold [EMAIL PROTECTED] wrote: The problem original occurs with the fb_defio driver (driver/video/fb_defio.c). This driver use

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 13:51 -0400, Jaya Kumar wrote: On 10/29/07, Peter Zijlstra [EMAIL PROTECTED] wrote: On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: An aside, I just tested that deferred IO works fine on 2.6.22.10/pxa255. I understood from the thread that PeterZ is looking

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Peter Zijlstra [EMAIL PROTECTED] wrote: On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: An aside, I just tested that deferred IO works fine on 2.6.22.10/pxa255. I understood from the thread that PeterZ is looking into page_mkclean changes which I guess went into 2.6.23.

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Peter Zijlstra
On Mon, 2007-10-29 at 19:17 +0100, Peter Zijlstra wrote: On Mon, 2007-10-29 at 13:51 -0400, Jaya Kumar wrote: On 10/29/07, Peter Zijlstra [EMAIL PROTECTED] wrote: On Mon, 2007-10-29 at 01:17 -0700, Jaya Kumar wrote: An aside, I just tested that deferred IO works fine on

Re: vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-29 Thread Jaya Kumar
On 10/29/07, Peter Zijlstra [EMAIL PROTECTED] wrote: [ also, remap_vmalloc_range() suffers similar issues, only file and anon have proper rmap ] I'm not sure we want full rmap for remap_pfn/vmalloc_range, but perhaps we could assist drivers in maintaining and using vma lists. I think

vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-22 Thread Stefani Seibold
Hi, i have a problem with vmalloc() and vm_ops.page_mkwrite(). ReadOnly access works, but on a write access the VM will endless invoke the vm_ops.page_mkwrite() handler. I tracked down the problem to the struct page.mapping pointer, which is NULL. The problem original occurs with the

vm_ops.page_mkwrite() fails with vmalloc on 2.6.23

2007-10-22 Thread Stefani Seibold
Hi, i have a problem with vmalloc() and vm_ops.page_mkwrite(). ReadOnly access works, but on a write access the VM will endless invoke the vm_ops.page_mkwrite() handler. I tracked down the problem to the struct page.mapping pointer, which is NULL. The problem original occurs with the