Re: [PATCH]: 1/4 batch mark_page_accessed()

From: Andrew Morton
Date: Wed Dec 01 2004 - 21:01:54 EST


Marcelo Tosatti <marcelo.tosatti@xxxxxxxxxxxx> wrote:
>
> > I don't think that atomic_inc will be particularly
> > costly. generic_file_{write,read}() call find_get_page() just before
> > calling mark_page_accessed(), so cache-line with page reference counter
> > is most likely still exclusive owned by this CPU.
>
> Assuming that is true - what could cause the slowdown?

It isn't true. Atomic ops have a considerable overhead, and this is
unrelated to cache misses. This is especially true of p4's.

Now, that overhead may be justified. Needs more study.
-
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/