From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC][PATCH] 9p: add readahead support for loose mode Date: Sun, 16 Sep 2007 22:16:06 +0200 Message-ID: <20070916221606.065e449f@lappy> References: <11897857601214-git-send-email-ericvh@gmail.com> <20070915034126.cd2c2073.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Eric Van Hensbergen , v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Andrew Morton Return-path: Received: from canuck.infradead.org ([209.217.80.40]:39758 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbXIPUQx (ORCPT ); Sun, 16 Sep 2007 16:16:53 -0400 In-Reply-To: <20070915034126.cd2c2073.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, 15 Sep 2007 03:41:26 -0700 Andrew Morton wrote: > eww, kmap. Large amounts of them, apparently. > > Be aware that kmap is a) slow and b) deadlockable. The latter happens when > multiple tasks want to take more than one kmap simultaneously: they all > wait for someone else to release one. Your code here seems especially > vulnerable to this. > > Nick had a kmap-speedup patchset a while back which addressed a) but I > don't know if it addressed the deadlock. But that patch seemed to die. That would've been me. What I did to address b) is to pre-allocate each kmap user a second kmap slot. Of course this isn't water-tight either. These patches are part of -rt, I could respin against mainline if there is interest.