Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: > I was counting from the top down. > Bottom-up is better; that way the levels don't change for 2,3,4 level pagetables. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Matt Mackall
On Thu, Apr 19, 2007 at 02:37:53PM -0700, Jeremy Fitzhardinge wrote: > Matt Mackall wrote: > > Haven't thought a huge amount about that. Perhaps it's best done with > > the level 3 callback? > > > > Level 2, I think, assuming you count the pte pages as level 1. I think > it can be dealt with,

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: > Haven't thought a huge amount about that. Perhaps it's best done with > the level 3 callback? > Level 2, I think, assuming you count the pte pages as level 1. I think it can be dealt with, so long as it correctly skips level 1 callbacks for superpages, and does the test

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Matt Mackall
On Thu, Apr 19, 2007 at 12:44:57PM -0700, Jeremy Fitzhardinge wrote: > Matt Mackall wrote: > > I think adding a flags field and an allocate flag to my callback > > struct would be sufficient here. > > > > Yes, probably. > > What about something that wants to shatter superpages? Haven't

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: > I think adding a flags field and an allocate flag to my callback > struct would be sufficient here. > Yes, probably. What about something that wants to shatter superpages? > The syntax is horrible, but I don't think we end up using the > resultant type enough to justify

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: I think adding a flags field and an allocate flag to my callback struct would be sufficient here. Yes, probably. What about something that wants to shatter superpages? The syntax is horrible, but I don't think we end up using the resultant type enough to justify the

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Matt Mackall
On Thu, Apr 19, 2007 at 12:44:57PM -0700, Jeremy Fitzhardinge wrote: Matt Mackall wrote: I think adding a flags field and an allocate flag to my callback struct would be sufficient here. Yes, probably. What about something that wants to shatter superpages? Haven't thought a huge

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: Haven't thought a huge amount about that. Perhaps it's best done with the level 3 callback? Level 2, I think, assuming you count the pte pages as level 1. I think it can be dealt with, so long as it correctly skips level 1 callbacks for superpages, and does the test

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Matt Mackall
On Thu, Apr 19, 2007 at 02:37:53PM -0700, Jeremy Fitzhardinge wrote: Matt Mackall wrote: Haven't thought a huge amount about that. Perhaps it's best done with the level 3 callback? Level 2, I think, assuming you count the pte pages as level 1. I think it can be dealt with, so long

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-19 Thread Jeremy Fitzhardinge
Matt Mackall wrote: I was counting from the top down. Bottom-up is better; that way the levels don't change for 2,3,4 level pagetables. J - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-17 Thread Matt Mackall
On Wed, Apr 04, 2007 at 11:52:57PM -0700, Jeremy Fitzhardinge wrote: > Matt Mackall wrote: > >> +/* > >> + * Scan a region of virtual memory, filling in page tables as necessary > >> + * and calling a provided function on each leaf page table. > >> + */ > >> > > > > But I'm not sure what the

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-17 Thread Matt Mackall
On Wed, Apr 04, 2007 at 11:52:57PM -0700, Jeremy Fitzhardinge wrote: Matt Mackall wrote: +/* + * Scan a region of virtual memory, filling in page tables as necessary + * and calling a provided function on each leaf page table. + */ But I'm not sure what the use case is that

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-05 Thread Jeremy Fitzhardinge
Matt Mackall wrote: >> +/* >> + * Scan a region of virtual memory, filling in page tables as necessary >> + * and calling a provided function on each leaf page table. >> + */ >> > > But I'm not sure what the use case is that wants filling in the page > table..? If both modes really make

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-05 Thread Jeremy Fitzhardinge
Matt Mackall wrote: +/* + * Scan a region of virtual memory, filling in page tables as necessary + * and calling a provided function on each leaf page table. + */ But I'm not sure what the use case is that wants filling in the page table..? If both modes really make sense, perhaps a

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-04 Thread Matt Mackall
On Wed, Apr 04, 2007 at 12:12:11PM -0700, Jeremy Fitzhardinge wrote: > Add a new mm function apply_to_page_range() which applies a given > function to every pte in a given virtual address range in a given mm > structure. This is a generic alternative to cut-and-pasting the Linux > idiomatic

[patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-04 Thread Jeremy Fitzhardinge
Add a new mm function apply_to_page_range() which applies a given function to every pte in a given virtual address range in a given mm structure. This is a generic alternative to cut-and-pasting the Linux idiomatic pagetable walking code in every place that a sequence of PTEs must be accessed.

[patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-04 Thread Jeremy Fitzhardinge
Add a new mm function apply_to_page_range() which applies a given function to every pte in a given virtual address range in a given mm structure. This is a generic alternative to cut-and-pasting the Linux idiomatic pagetable walking code in every place that a sequence of PTEs must be accessed.

Re: [patch 20/20] Add apply_to_page_range() which applies a function to a pte range.

2007-04-04 Thread Matt Mackall
On Wed, Apr 04, 2007 at 12:12:11PM -0700, Jeremy Fitzhardinge wrote: Add a new mm function apply_to_page_range() which applies a given function to every pte in a given virtual address range in a given mm structure. This is a generic alternative to cut-and-pasting the Linux idiomatic pagetable