[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1175766600.6483.100.camel@twins>
Date: Thu, 05 Apr 2007 11:50:00 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [patch 2/2] only allow nonlinear vmas for ram backed
filesystems
On Thu, 2007-04-05 at 11:39 +0200, Miklos Szeredi wrote:
> > > + /*
> > > + * page_mkclean doesn't work on nonlinear vmas, so if dirty
> > > + * pages need to be accounted, emulate with linear vmas.
> > > + */
> > > + if (mapping_cap_account_dirty(mapping)) {
> >
> > Perhaps this should read:
> >
> > if (vma_wants_writenotify(vma)) {
> >
>
> I looked at that, but IIRC vma_wants_writenotify() doesn't work after
> mmap(), because of the updated protection bits.
Right, bother, that again. I fudged it in mprotect by setting the pgprot
bits to what was expected although I had a parametrised version earlier.
But that was disliked.
> > That way we would even allow read only non-linear mappings of 'real'
> > filesystem files.
>
> Well, we could do that, but is it really worth the hassle? The real
> question is whether anyone would want to use non-linear
> shared-read-only mappings or not.
Hmm, yeah, I thought that was the case with that code snippet Andrew
pulled of the interweb, but on second inspection they do map it writable
too. I was led astray by the fact that they map the same file twice.
Oh well, lets just keep the patch as is then.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists