Re: [RFC v1][PATCH]page_fault retry with NOPAGE_RETRY

From: Andrew Morton
Date: Sat Nov 22 2008 - 02:15:32 EST


On Fri, 21 Nov 2008 22:47:44 -0800 Ying Han <yinghan@xxxxxxxxxx> wrote:

> page fault retry with NOPAGE_RETRY
> Allow major faults to drop the mmap_sem read lock while waitting for
> synchronous disk read. This allows another thread which wishes to grab
> down_read(mmap_sem) to proceed while the current is waitting the disk IO.

Confused. down_read() on an rwsem will already permit multiple threads
to run that section of ccode concurrently.

The benefit here will be to permit down_write() callers (eg:
sys_mmap()) to get in there and do work.

> The patch flags current->flags to PF_FAULT_MAYRETRY as identify that the
> caller can tolerate the retry in the filemap_fault call patch.
>
> Benchmark is done by mmap in huge file and spaw 64 thread each faulting in
> pages in reverse order, the the result shows 8% porformance hit with the
> patch.

You mean it slowed down 8%? I'm a bit surprised - I'd have expected a
smaller slowdown for an IO-intensive thing like this.

Does it speed anything up?

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