Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Miklos Szeredi
> > > And it doesn't sound too hard to solve: when current algorithm doesn't > > > seem to be making progress, then it will have to be done the hard way, > > > searching for for all nonlinear ptes of a page to unmap. > > > > Ah, you see, but that is when you've already lost. > > > > The DoS is ab

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Nick Piggin
On Thu, Mar 08, 2007 at 01:11:43PM +0100, Peter Zijlstra wrote: > On Thu, 2007-03-08 at 12:48 +0100, Miklos Szeredi wrote: > > > However this still leaves the non-linear reclaim (Nick pointed it out as > > > a potential DoS and other people have corroborated this). I have no idea > > > on that to d

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Peter Zijlstra
On Thu, 2007-03-08 at 12:48 +0100, Miklos Szeredi wrote: > > However this still leaves the non-linear reclaim (Nick pointed it out as > > a potential DoS and other people have corroborated this). I have no idea > > on that to do about that. > > OK, but that is a completely different problem, not a

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Miklos Szeredi
> > - it's a maintenance burden: I'll have to layer the m/ctime update > > patch on top of this > > But you have to update m/ctime for BDI_CAP_NO_WRITEBACK mappings anyway > don't you? Yes, but that's a different aspect of msync(), not about the data writeback issues that nonlinear mappings

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Nick Piggin
On Thu, Mar 08, 2007 at 12:21:01PM +0100, Miklos Szeredi wrote: > > Partial revert of commit: 204ec841fbea3e5138168edbc3a76d46747cc987 > > > > Non-linear vmas aren't properly handled by page_mkclean() and fixing that > > would result in linear scans of all related non-linear vmas per > > page_mkc

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Miklos Szeredi
> However this still leaves the non-linear reclaim (Nick pointed it out as > a potential DoS and other people have corroborated this). I have no idea > on that to do about that. OK, but that is a completely different problem, not affecting page_mkclean() or msync(). And it doesn't sound too hard

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Peter Zijlstra
On Thu, 2007-03-08 at 12:21 +0100, Miklos Szeredi wrote: > > Partial revert of commit: 204ec841fbea3e5138168edbc3a76d46747cc987 > > > > Non-linear vmas aren't properly handled by page_mkclean() and fixing that > > would result in linear scans of all related non-linear vmas per > > page_mkclean()

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-08 Thread Miklos Szeredi
> Partial revert of commit: 204ec841fbea3e5138168edbc3a76d46747cc987 > > Non-linear vmas aren't properly handled by page_mkclean() and fixing that > would result in linear scans of all related non-linear vmas per page_mkclean() > invocation. > > This is deemed too costly, hence re-instate the msy

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 19:12 +0100, Peter Zijlstra wrote: > On Wed, 2007-03-07 at 10:00 -0800, Linus Torvalds wrote: > > > > On Wed, 7 Mar 2007, Peter Zijlstra wrote: > > > > > > I'm not at all happy with this, but plain disallowing remap_file_pages on > > > bdis > > > without BDI_CAP_NO_WRITEBAC

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-07 Thread Peter Zijlstra
On Wed, 2007-03-07 at 10:00 -0800, Linus Torvalds wrote: > > On Wed, 7 Mar 2007, Peter Zijlstra wrote: > > > > I'm not at all happy with this, but plain disallowing remap_file_pages on > > bdis > > without BDI_CAP_NO_WRITEBACK seems to offend some people, hence restrict it > > to > > root only.

Re: [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas

2007-03-07 Thread Linus Torvalds
On Wed, 7 Mar 2007, Peter Zijlstra wrote: > > I'm not at all happy with this, but plain disallowing remap_file_pages on bdis > without BDI_CAP_NO_WRITEBACK seems to offend some people, hence restrict it to > root only. I don't think that's a viable approach. Nonlinear mappings would normally b