Re: [PATCH 1/3] mm: tracking shared dirty pages

From: Christoph Lameter
Date: Tue May 30 2006 - 16:21:47 EST


On Tue, 30 May 2006, David Howells wrote:

> Christoph Lameter <clameter@xxxxxxx> wrote:
>
> > On Tue, 30 May 2006, David Howells wrote:
> >
> > > > If set_page_dirty cannot reserve the page then we know that some severe
> > > > action is required. The FS method set_page_dirty() could:
> > >
> > > But by the time set_page_dirty() is called, it's too late as the code
> > > currently stands. We've already marked the PTE writable and dirty. The
> > > page_mkwrite() op is called _first_.
> >
> > We are in set_page_dirty and this would be part of set_page_dirty
> > processing.
>
> Eh? What do you mean "We are in set_page_dirty"?

We could do the reservation in as part of the set_page_dirty FS method.

> Actually, I'm not sure that calling set_page_dirty() at the bottom of
> do_wp_page() is necessarily a good idea. It's possible that the page will be
> marked dirty in do_wp_page() and then will get written back before the write
> actually succeeds. In other words the page may be marked dirty and cleaned up
> all before the modification _actually_ occurs. On the other hand, the common
> case is probably that the store instruction will beat the writeback.

Yes we are aware of that case.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/