Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-21 Thread Blaisorblade
On Tuesday 20 March 2007 07:00, Nick Piggin wrote: > On Mon, Mar 19, 2007 at 09:44:28PM +0100, Blaisorblade wrote: > > On Sunday 18 March 2007 03:50, Nick Piggin wrote: > > > > > Yes, I believe that is the case, however I wonder if that is going > > > > > to be a problem for you to distinguish

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-21 Thread Blaisorblade
On Tuesday 20 March 2007 07:00, Nick Piggin wrote: On Mon, Mar 19, 2007 at 09:44:28PM +0100, Blaisorblade wrote: On Sunday 18 March 2007 03:50, Nick Piggin wrote: Yes, I believe that is the case, however I wonder if that is going to be a problem for you to distinguish between write

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Nick Piggin
On Mon, Mar 19, 2007 at 09:44:28PM +0100, Blaisorblade wrote: > On Sunday 18 March 2007 03:50, Nick Piggin wrote: > > > > > > > > Yes, I believe that is the case, however I wonder if that is going to > > > > be a problem for you to distinguish between write faults for clean > > > > writable ptes,

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Blaisorblade
On Sunday 18 March 2007 03:50, Nick Piggin wrote: > On Sat, Mar 17, 2007 at 01:17:00PM +0100, Blaisorblade wrote: > > On Tuesday 13 March 2007 02:19, Nick Piggin wrote: > > > On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: > > > > On Wednesday 07 March 2007 11:02, Nick Piggin wrote:

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Bill Irwin
On Sun, Mar 18, 2007 at 03:50:10AM +0100, Nick Piggin wrote: > Yes, that should be the case. So would this mean that nonlinear protections > don't work on regular files? I guess that's OK if Oracle and UML both use > tmpfs/shm? Sometimes ramfs is also used in the Oracle case. I presume that's

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Bill Irwin
On Sun, Mar 18, 2007 at 03:50:10AM +0100, Nick Piggin wrote: Yes, that should be the case. So would this mean that nonlinear protections don't work on regular files? I guess that's OK if Oracle and UML both use tmpfs/shm? Sometimes ramfs is also used in the Oracle case. I presume that's even

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Blaisorblade
On Sunday 18 March 2007 03:50, Nick Piggin wrote: On Sat, Mar 17, 2007 at 01:17:00PM +0100, Blaisorblade wrote: On Tuesday 13 March 2007 02:19, Nick Piggin wrote: On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: On Wednesday 07 March 2007 11:02, Nick Piggin wrote:

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-19 Thread Nick Piggin
On Mon, Mar 19, 2007 at 09:44:28PM +0100, Blaisorblade wrote: On Sunday 18 March 2007 03:50, Nick Piggin wrote: Yes, I believe that is the case, however I wonder if that is going to be a problem for you to distinguish between write faults for clean writable ptes, and write faults

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-18 Thread Jeff Dike
On Sun, Mar 18, 2007 at 03:50:10AM +0100, Nick Piggin wrote: > Yes, that should be the case. So would this mean that nonlinear protections > don't work on regular files? I guess that's OK if Oracle and UML both use > tmpfs/shm? It's OK for UML. Jeff -- Work email - jdike at

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-18 Thread Jeff Dike
On Sun, Mar 18, 2007 at 03:50:10AM +0100, Nick Piggin wrote: Yes, that should be the case. So would this mean that nonlinear protections don't work on regular files? I guess that's OK if Oracle and UML both use tmpfs/shm? It's OK for UML. Jeff -- Work email - jdike at linux

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-17 Thread Nick Piggin
On Sat, Mar 17, 2007 at 01:17:00PM +0100, Blaisorblade wrote: > On Tuesday 13 March 2007 02:19, Nick Piggin wrote: > > On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: > > > On Wednesday 07 March 2007 11:02, Nick Piggin wrote: > > > > > Yeah, tmpfs/shm segs are what I was thinking

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-17 Thread Blaisorblade
On Tuesday 13 March 2007 02:19, Nick Piggin wrote: > On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: > > On Wednesday 07 March 2007 11:02, Nick Piggin wrote: > > > > Yeah, tmpfs/shm segs are what I was thinking about. If UML can live > > > > with that as well, then I think it might

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-17 Thread Blaisorblade
On Tuesday 13 March 2007 02:19, Nick Piggin wrote: On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: On Wednesday 07 March 2007 11:02, Nick Piggin wrote: Yeah, tmpfs/shm segs are what I was thinking about. If UML can live with that as well, then I think it might be a good

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-17 Thread Nick Piggin
On Sat, Mar 17, 2007 at 01:17:00PM +0100, Blaisorblade wrote: On Tuesday 13 March 2007 02:19, Nick Piggin wrote: On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: On Wednesday 07 March 2007 11:02, Nick Piggin wrote: Yeah, tmpfs/shm segs are what I was thinking about. If UML

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-12 Thread Nick Piggin
On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: > On Wednesday 07 March 2007 11:02, Nick Piggin wrote: > > > > > > Yeah, tmpfs/shm segs are what I was thinking about. If UML can live with > > > that as well, then I think it might be a good option. > > > > Oh, hmm if you can

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-12 Thread Blaisorblade
On Wednesday 07 March 2007 11:02, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 10:49:47AM +0100, Nick Piggin wrote: > > On Wed, Mar 07, 2007 at 01:44:20AM -0800, Bill Irwin wrote: > > > On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: > > > > Depending on whether anyone wants it, and

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-12 Thread Blaisorblade
On Wednesday 07 March 2007 11:02, Nick Piggin wrote: On Wed, Mar 07, 2007 at 10:49:47AM +0100, Nick Piggin wrote: On Wed, Mar 07, 2007 at 01:44:20AM -0800, Bill Irwin wrote: On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: Depending on whether anyone wants it, and what

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-12 Thread Nick Piggin
On Tue, Mar 13, 2007 at 12:01:13AM +0100, Blaisorblade wrote: On Wednesday 07 March 2007 11:02, Nick Piggin wrote: Yeah, tmpfs/shm segs are what I was thinking about. If UML can live with that as well, then I think it might be a good option. Oh, hmm if you can truncate these

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-08 Thread Blaisorblade
On Wednesday 07 March 2007 10:44, Bill Irwin wrote: > On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: > > Depending on whether anyone wants it, and what features they want, we > > could emulate the old syscall, and make a new restricted one which is > > much less intrusive. > > For

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-08 Thread Blaisorblade
On Wednesday 07 March 2007 10:44, Bill Irwin wrote: On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: Depending on whether anyone wants it, and what features they want, we could emulate the old syscall, and make a new restricted one which is much less intrusive. For example, if

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Jeff Dike
On Wed, Mar 07, 2007 at 02:52:12PM +0100, Peter Zijlstra wrote: > > Well I don't think UML uses nonlinear yet anyway, does it? Can they > > make do with restricting nonlinear to mlocked vmas, I wonder? Probably > > not. > > I think it does, but lets ask, Jeff? Nope, UML needs to be able to

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 03:34:27PM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 14:52 +0100, Peter Zijlstra wrote: > > > True. We could even guesstimate the nonlinear dirty pages by subtracting > > the result of page_mkclean() from page_mapcount() and force an > > msync(MS_ASYNC) on said

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 02:53:07PM +0100, Miklos Szeredi wrote: > > > msync() might never get called and then we're back with the old > > > behaviour where we can surprise the VM with a ton of dirty pages. > > > > But we're root. With your patch, root *can't* do nonlinear writeback > > well.

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 14:52 +0100, Peter Zijlstra wrote: > True. We could even guesstimate the nonlinear dirty pages by subtracting > the result of page_mkclean() from page_mapcount() and force an > msync(MS_ASYNC) on said mapping (or all (nonlinear) mappings of the > related file) when some

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> > Well I don't think UML uses nonlinear yet anyway, does it? Can they > > make do with restricting nonlinear to mlocked vmas, I wonder? Probably > > not. > > I think it does, but lets ask, Jeff? Looks like it doesn't: $ grep -r remap_file_pages arch/um/ $ Miklos - To unsubscribe from this

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> On Wed, Mar 07, 2007 at 02:19:22PM +0100, Peter Zijlstra wrote: > > On Wed, 2007-03-07 at 14:08 +0100, Nick Piggin wrote: > > > > > > > The thing is, I don't think anybody who uses these things cares > > > > > about any of the 'problems' you want to fix, do they? We are > > > > > interested in

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 14:36 +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 02:19:22PM +0100, Peter Zijlstra wrote: > > On Wed, 2007-03-07 at 14:08 +0100, Nick Piggin wrote: > > > > > > > The thing is, I don't think anybody who uses these things cares > > > > > about any of the 'problems' you

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 02:19:22PM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 14:08 +0100, Nick Piggin wrote: > > > > > The thing is, I don't think anybody who uses these things cares > > > > about any of the 'problems' you want to fix, do they? We are > > > > interested in dirty pages

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 14:08 +0100, Nick Piggin wrote: > > > The thing is, I don't think anybody who uses these things cares > > > about any of the 'problems' you want to fix, do they? We are > > > interested in dirty pages only for the correctness issue, rather > > > than performance. Same as

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:41:26PM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 13:17 +0100, Nick Piggin wrote: > > > > Tracking these ranges on a per-vma basis would avoid taking the mm wide > > > mmap_sem and so would be cheaper than regular vmas. > > > > > > Would that still be too

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 13:17 +0100, Nick Piggin wrote: > > Tracking these ranges on a per-vma basis would avoid taking the mm wide > > mmap_sem and so would be cheaper than regular vmas. > > > > Would that still be too expensive? > > Well you can today remap N pages in a file, arbitrarily for >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 04:22:24AM -0800, Bill Irwin wrote: > On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote: > >> Well, now they don't, but it could be done or even exploited as a DoS. > > On Wed, Mar 07, 2007 at 12:00:36PM +0100, Nick Piggin wrote: > > But so could nonlinear

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote: >> Well, now they don't, but it could be done or even exploited as a DoS. On Wed, Mar 07, 2007 at 12:00:36PM +0100, Nick Piggin wrote: > But so could nonlinear page reclaim. I think we need to restrict nonlinear > mappings to root if

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 12:48:06PM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 12:00 +0100, Nick Piggin wrote: > > On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote: > > > On Wed, 2007-03-07 at 11:38 +0100, Nick Piggin wrote: > > > > > > > > > There are real users who want

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 12:00 +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote: > > On Wed, 2007-03-07 at 11:38 +0100, Nick Piggin wrote: > > > > > > > There are real users who want these fast, though. > > > > > > > > Yeah, why don't we have a tree per

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 11:38 +0100, Nick Piggin wrote: > > > > > There are real users who want these fast, though. > > > > > > Yeah, why don't we have a tree per nonlinear vma to find these pages? > > > > > > wli mentions shadow

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 11:38 +0100, Nick Piggin wrote: > > > There are real users who want these fast, though. > > > > Yeah, why don't we have a tree per nonlinear vma to find these pages? > > > > wli mentions shadow page tables.. > > We could do something more efficient, but I thought that

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Benjamin Herrenschmidt
On Wed, 2007-03-07 at 11:17 +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 11:05:48AM +0100, Benjamin Herrenschmidt wrote: > > > > > > NOPAGE_REFAULT is removed. This should be implemented with ->fault, and > > > > no users have hit mainline yet. > > > > > > Did benh agree with that? > > >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 11:24:45AM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 11:21 +0100, Nick Piggin wrote: > > On Wed, Mar 07, 2007 at 11:13:20AM +0100, Miklos Szeredi wrote: > > > > *sigh* yes was looking at all that code, thats gonna be darn slow > > > > though, but I'll whip up a

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 11:21 +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 11:13:20AM +0100, Miklos Szeredi wrote: > > > *sigh* yes was looking at all that code, thats gonna be darn slow > > > though, but I'll whip up a patch. > > > > Well, if it's going to be darn slow, maybe it's better to

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 11:13:20AM +0100, Miklos Szeredi wrote: > > *sigh* yes was looking at all that code, thats gonna be darn slow > > though, but I'll whip up a patch. > > Well, if it's going to be darn slow, maybe it's better to go with > mingo's plan on emulating nonlinear vmas with linear

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 11:05:48AM +0100, Benjamin Herrenschmidt wrote: > > > > NOPAGE_REFAULT is removed. This should be implemented with ->fault, and > > > no users have hit mainline yet. > > > > Did benh agree with that? > > I won't use NOPAGE_REFAULT, I use NOPFN_REFAULT and that has hit >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> *sigh* yes was looking at all that code, thats gonna be darn slow > though, but I'll whip up a patch. Well, if it's going to be darn slow, maybe it's better to go with mingo's plan on emulating nonlinear vmas with linear ones. That'll be darn slow as well, but at least it will be much less

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Benjamin Herrenschmidt
> > NOPAGE_REFAULT is removed. This should be implemented with ->fault, and > > no users have hit mainline yet. > > Did benh agree with that? I won't use NOPAGE_REFAULT, I use NOPFN_REFAULT and that has hit mainline. I will switch to ->fault when I have time to adapt the code, in the meantime,

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, 7 Mar 2007 01:29:03 -0800 Bill Irwin <[EMAIL PROTECTED]> wrote: >> Guess what major real-life application not only uses nonlinear daily >> but would even be very happy to see it extended with non-vma-creating >> protections and more? On Wed, Mar 07, 2007 at 01:39:42AM -0800, Andrew Morton

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 11:04 +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 10:45:03AM +0100, Nick Piggin wrote: > > On Wed, Mar 07, 2007 at 10:32:22AM +0100, Peter Zijlstra wrote: > > > > > > Can recollect as much, I modelled it after page_referenced() and can't > > > find any VM_NONLINEAR

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 10:45:03AM +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 10:32:22AM +0100, Peter Zijlstra wrote: > > > > Can recollect as much, I modelled it after page_referenced() and can't > > find any VM_NONLINEAR specific code in there either. > > > > Will have a hard look,

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 10:49:47AM +0100, Nick Piggin wrote: > On Wed, Mar 07, 2007 at 01:44:20AM -0800, Bill Irwin wrote: > > On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: > > > Depending on whether anyone wants it, and what features they want, we > > > could emulate the old

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, Mar 07, 2007 at 10:22:52AM +0100, Ingo Molnar wrote: >>> ok. What do you think about the sys_remap_file_pages_prot() thing that >>> Paolo has done in a nicely split up form - does that complicate things >>> in any fundamental way? That is what is useful to UML. * Bill Irwin <[EMAIL

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 10:22:52AM +0100, Ingo Molnar wrote: > > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > After these patches, I don't think there is too much burden. The main > > thing left really is just the objrmap stuff, but that is just handled > > with a minimal 'dumb' algorithm

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:44:20AM -0800, Bill Irwin wrote: > On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: > > Depending on whether anyone wants it, and what features they want, we > > could emulate the old syscall, and make a new restricted one which is > > much less intrusive. >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: > Depending on whether anyone wants it, and what features they want, we > could emulate the old syscall, and make a new restricted one which is > much less intrusive. > For example, if we can operate only on MAP_ANONYMOUS memory and

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 10:32:22AM +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 01:07 -0800, Andrew Morton wrote: > > On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > > > Dirty page accounting doesn't work either on > > > > > non-linear mappings > > >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:26:38AM -0800, Andrew Morton wrote: > On Wed, 7 Mar 2007 10:18:23 +0100 Nick Piggin <[EMAIL PROTECTED]> wrote: > > > > > msync breakage is bad, but otherwise I don't know that we care about > > dirty page writeout efficiency. > > Well. We made so many changes to

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 01:29:03 -0800 Bill Irwin <[EMAIL PROTECTED]> wrote: > On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar <[EMAIL PROTECTED]> wrote: > >> btw., if we decide that nonlinear isnt worth the continuing maintainance > >> pain, we could internally implement/emulate sys_remap_file_pages()

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Bill Irwin <[EMAIL PROTECTED]> wrote: > * Nick Piggin <[EMAIL PROTECTED]> wrote: > >> After these patches, I don't think there is too much burden. The main > >> thing left really is just the objrmap stuff, but that is just handled > >> with a minimal 'dumb' algorithm that doesn't cost much.

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 01:07 -0800, Andrew Morton wrote: > On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > Dirty page accounting doesn't work either on > > > > non-linear mappings > > > > > > It doesn't? Confused - these things don't have anything to do

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
* Nick Piggin <[EMAIL PROTECTED]> wrote: >> After these patches, I don't think there is too much burden. The main >> thing left really is just the objrmap stuff, but that is just handled >> with a minimal 'dumb' algorithm that doesn't cost much. On Wed, Mar 07, 2007 at 10:22:52AM +0100, Ingo

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> > But I think we discovered that those msync changes are bogus anyway > > becuase there is a small race window where pte could be dirtied without > > page being set dirty? > > Dunno, I don't recall that. We dirty the page before the pte... That's the one I just submitted a fix for ;)

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar <[EMAIL PROTECTED]> wrote: >> btw., if we decide that nonlinear isnt worth the continuing maintainance >> pain, we could internally implement/emulate sys_remap_file_pages() via a >> call to mremap() and essentially deprecate it, without breaking the

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 10:18:23 +0100 Nick Piggin <[EMAIL PROTECTED]> wrote: > On Wed, Mar 07, 2007 at 01:07:56AM -0800, Andrew Morton wrote: > > On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > > > Dirty page accounting doesn't work either on > > > > >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:53:23AM +0100, Ingo Molnar wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > btw., if we decide that nonlinear isnt worth the continuing > > > maintainance pain, we could internally implement/emulate > > > sys_remap_file_pages() via a call to mremap() and

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> > > > Look in page_mkclean(). Where does it handle non-linear mappings? > > > > OK, I'd forgotten about that. It won't break dirty memory accounting, > but it'll potentially break dirty memory balancing. > > If we have the wrong page (due to nonlinear), page_check_address() will > fail and

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > After these patches, I don't think there is too much burden. The main > thing left really is just the objrmap stuff, but that is just handled > with a minimal 'dumb' algorithm that doesn't cost much. ok. What do you think about the

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:07:56AM -0800, Andrew Morton wrote: > On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > > > Dirty page accounting doesn't work either on > > > > non-linear mappings > > > > > > It doesn't? Confused - these things don't have anything to

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:59:44AM +0100, Nick Piggin wrote: > Apart from a handful of trivial if (pte_file()) cases throughout mm/, > our maintainance burden basically now amounts to the following patch. > Even the rmap.c change looks bigger than it is because I split out > the nonlinear

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > > > Dirty page accounting doesn't work either on > > > non-linear mappings > > > > It doesn't? Confused - these things don't have anything to do with each > > other do they? > > Look in page_mkclean(). Where does

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:27:55AM +0100, Ingo Molnar wrote: > > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > Then 4,5,6 is the fault/nonlinear rewrite, take it or leave it. I > > thought you would have liked the patches... > > btw., if we decide that nonlinear isnt worth the continuing

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> > Dirty page accounting doesn't work either on > > non-linear mappings > > It doesn't? Confused - these things don't have anything to do with each > other do they? Look in page_mkclean(). Where does it handle non-linear mappings? Miklos - To unsubscribe from this list: send the line

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > > btw., if we decide that nonlinear isnt worth the continuing > > maintainance pain, we could internally implement/emulate > > sys_remap_file_pages() via a call to mremap() and essentially > > deprecate it, without breaking the ABI - and remove all

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 07 Mar 2007 09:38:34 +0100 Miklos Szeredi <[EMAIL PROTECTED]> wrote: > Dirty page accounting doesn't work either on > non-linear mappings It doesn't? Confused - these things don't have anything to do with each other do they? - To unsubscribe from this list: send the line "unsubscribe

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
> > If it doesn't look very impressive, it could be because it leaves all > > the old crud around for backwards compatibility (the worst offenders > > are removed in patch 6/6). > > > > If you look at the patchset as a whole, it removes about 250 lines, > > mostly of (non trivial) duplicated

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Nick Piggin <[EMAIL PROTECTED]> wrote: > > > If it doesn't look very impressive, it could be because it leaves all > > the old crud around for backwards compatibility (the worst offenders > > are removed in patch

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > If it doesn't look very impressive, it could be because it leaves all > the old crud around for backwards compatibility (the worst offenders > are removed in patch 6/6). > > If you look at the patchset as a whole, it removes about 250 lines, >

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 08:08:53AM +0100, Nick Piggin wrote: > On Tue, Mar 06, 2007 at 10:51:01PM -0800, Andrew Morton wrote: > > > This patch seems to churn things around an awful lot for minimal benefit. > > Well it fixes the whole design of the nonlinear fault path. If it doesn't look very

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 08:08:53AM +0100, Nick Piggin wrote: On Tue, Mar 06, 2007 at 10:51:01PM -0800, Andrew Morton wrote: This patch seems to churn things around an awful lot for minimal benefit. Well it fixes the whole design of the nonlinear fault path. If it doesn't look very

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: If it doesn't look very impressive, it could be because it leaves all the old crud around for backwards compatibility (the worst offenders are removed in patch 6/6). If you look at the patchset as a whole, it removes about 250 lines, mostly of

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar [EMAIL PROTECTED] wrote: * Nick Piggin [EMAIL PROTECTED] wrote: If it doesn't look very impressive, it could be because it leaves all the old crud around for backwards compatibility (the worst offenders are removed in patch 6/6). If

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
If it doesn't look very impressive, it could be because it leaves all the old crud around for backwards compatibility (the worst offenders are removed in patch 6/6). If you look at the patchset as a whole, it removes about 250 lines, mostly of (non trivial) duplicated code in

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 07 Mar 2007 09:38:34 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings It doesn't? Confused - these things don't have anything to do with each other do they? - To unsubscribe from this list: send the line unsubscribe

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
Dirty page accounting doesn't work either on non-linear mappings It doesn't? Confused - these things don't have anything to do with each other do they? Look in page_mkclean(). Where does it handle non-linear mappings? Miklos - To unsubscribe from this list: send the line unsubscribe

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Andrew Morton [EMAIL PROTECTED] wrote: btw., if we decide that nonlinear isnt worth the continuing maintainance pain, we could internally implement/emulate sys_remap_file_pages() via a call to mremap() and essentially deprecate it, without breaking the ABI - and remove all the

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:27:55AM +0100, Ingo Molnar wrote: * Nick Piggin [EMAIL PROTECTED] wrote: Then 4,5,6 is the fault/nonlinear rewrite, take it or leave it. I thought you would have liked the patches... btw., if we decide that nonlinear isnt worth the continuing maintainance

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings It doesn't? Confused - these things don't have anything to do with each other do they? Look in page_mkclean(). Where does it handle

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:59:44AM +0100, Nick Piggin wrote: Apart from a handful of trivial if (pte_file()) cases throughout mm/, our maintainance burden basically now amounts to the following patch. Even the rmap.c change looks bigger than it is because I split out the nonlinear unmapping

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:07:56AM -0800, Andrew Morton wrote: On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings It doesn't? Confused - these things don't have anything to do with each

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: After these patches, I don't think there is too much burden. The main thing left really is just the objrmap stuff, but that is just handled with a minimal 'dumb' algorithm that doesn't cost much. ok. What do you think about the

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
Look in page_mkclean(). Where does it handle non-linear mappings? OK, I'd forgotten about that. It won't break dirty memory accounting, but it'll potentially break dirty memory balancing. If we have the wrong page (due to nonlinear), page_check_address() will fail and we'll leave

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 10:18:23 +0100 Nick Piggin [EMAIL PROTECTED] wrote: On Wed, Mar 07, 2007 at 01:07:56AM -0800, Andrew Morton wrote: On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 09:53:23AM +0100, Ingo Molnar wrote: * Andrew Morton [EMAIL PROTECTED] wrote: btw., if we decide that nonlinear isnt worth the continuing maintainance pain, we could internally implement/emulate sys_remap_file_pages() via a call to mremap() and essentially

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Miklos Szeredi
But I think we discovered that those msync changes are bogus anyway becuase there is a small race window where pte could be dirtied without page being set dirty? Dunno, I don't recall that. We dirty the page before the pte... That's the one I just submitted a fix for ;)

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar [EMAIL PROTECTED] wrote: btw., if we decide that nonlinear isnt worth the continuing maintainance pain, we could internally implement/emulate sys_remap_file_pages() via a call to mremap() and essentially deprecate it, without breaking the ABI -

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
* Nick Piggin [EMAIL PROTECTED] wrote: After these patches, I don't think there is too much burden. The main thing left really is just the objrmap stuff, but that is just handled with a minimal 'dumb' algorithm that doesn't cost much. On Wed, Mar 07, 2007 at 10:22:52AM +0100, Ingo Molnar

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 01:07 -0800, Andrew Morton wrote: On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings It doesn't? Confused - these things don't have anything to do with each other do

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Ingo Molnar
* Bill Irwin [EMAIL PROTECTED] wrote: * Nick Piggin [EMAIL PROTECTED] wrote: After these patches, I don't think there is too much burden. The main thing left really is just the objrmap stuff, but that is just handled with a minimal 'dumb' algorithm that doesn't cost much. On Wed, Mar

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:26:38AM -0800, Andrew Morton wrote: On Wed, 7 Mar 2007 10:18:23 +0100 Nick Piggin [EMAIL PROTECTED] wrote: msync breakage is bad, but otherwise I don't know that we care about dirty page writeout efficiency. Well. We made so many changes to support the

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Andrew Morton
On Wed, 7 Mar 2007 01:29:03 -0800 Bill Irwin [EMAIL PROTECTED] wrote: On Wed, 7 Mar 2007 09:27:55 +0100 Ingo Molnar [EMAIL PROTECTED] wrote: btw., if we decide that nonlinear isnt worth the continuing maintainance pain, we could internally implement/emulate sys_remap_file_pages() via a

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Bill Irwin
On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: Depending on whether anyone wants it, and what features they want, we could emulate the old syscall, and make a new restricted one which is much less intrusive. For example, if we can operate only on MAP_ANONYMOUS memory and specify

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 10:32:22AM +0100, Peter Zijlstra wrote: On Wed, 2007-03-07 at 01:07 -0800, Andrew Morton wrote: On Wed, 07 Mar 2007 09:51:57 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Dirty page accounting doesn't work either on non-linear mappings It doesn't?

Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)

2007-03-07 Thread Nick Piggin
On Wed, Mar 07, 2007 at 01:44:20AM -0800, Bill Irwin wrote: On Wed, Mar 07, 2007 at 10:28:21AM +0100, Nick Piggin wrote: Depending on whether anyone wants it, and what features they want, we could emulate the old syscall, and make a new restricted one which is much less intrusive. For

  1   2   >