Re: [RFC] page fault retry with NOPAGE_RETRY

From: Andrew Morton
Date: Fri Sep 15 2006 - 03:35:53 EST


On Fri, 15 Sep 2006 00:11:51 -0700
Andrew Morton <akpm@xxxxxxxx> wrote:

> b) It could be more efficient. Most of the time, there's no need to
> back all the way out of the pagefault handler and rerun the whole thing.
> Because most of the time, nobody changed anything in the mm_struct. We
> _could_ just retake the mmap_sem after the page comes uptodate and, if
> nothing has changed, proceed. I see two ways of doing this:
>
> - The simple way: look to see if any other processes are sharing
> this mm_struct. If not, just do the synchronous read inside mmap_sem.

This assumes that no other heavyweight process will try to modify this
single-threaded process's mm. I don't _think_ that happens anywhere, does
it? access_process_vm() is the only case I can think of, and it does
down_read(other process's mmap_sem).

-
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/