From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [RFC PATCH 0/2] O_DIRECT locking rework Date: Fri, 20 Oct 2006 16:12:45 -0400 Message-ID: <20061020201245.GE8674@think.oraclecorp.com> References: <20061020183237.GA8674@think.oraclecorp.com> <20061020123058.8b422339.akpm@osdl.org> <45392B8C.3070208@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:59349 "EHLO agminet01.oracle.com") by vger.kernel.org with ESMTP id S1422784AbWJTUM5 (ORCPT ); Fri, 20 Oct 2006 16:12:57 -0400 To: Zach Brown Content-Disposition: inline In-Reply-To: <45392B8C.3070208@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Oct 20, 2006 at 01:03:24PM -0700, Zach Brown wrote: > > > I think the fake placeholder page can be a kernel-wide thing rather than > > per-dio? That would be most desirable because then we have > > > > #define PagePlaceHolder(page) (page == global_placeholder_page) > > That would be nice. The current patch hashes the page pointer with > page_waitqueue(page) to get at the zone's hashed wait queue buckets. It > would probably want to avoid that hot spot by getting at the buckets by > hashing the mapping and file offset, I guess. The page_waitqueue part only happens in the contention case. This will either be buffered vs direct io, direct io vs direct io or direct io vs truncate. I think all three should be rare enough that a single waitqueue won't hurt. It is also very hard to know the file offset without asking the radix tree, since we can't trust placeholder_page->index. -chris