Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342Ab0HTMSK (ORCPT ); Fri, 20 Aug 2010 08:18:10 -0400 Received: from mx2.netapp.com ([216.240.18.37]:48371 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796Ab0HTMSH convert rfc822-to-8bit (ORCPT ); Fri, 20 Aug 2010 08:18:07 -0400 X-IronPort-AV: E=Sophos;i="4.56,239,1280732400"; d="scan'208";a="432886801" Subject: Re: [PATCH] VM: kswapd should not do blocking memory allocations From: Trond Myklebust To: Wu Fengguang Cc: Ram Pai , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org In-Reply-To: <20100820054533.GB11847@localhost> References: <1282158241.8540.85.camel@heimdal.trondhjem.org> <1282159872.8540.96.camel@heimdal.trondhjem.org> <20100820054533.GB11847@localhost> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Organization: NetApp Date: Fri, 20 Aug 2010 08:17:08 -0400 Message-ID: <1282306628.3927.0.camel@heimdal.trondhjem.org> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 (2.30.2-4.fc13) X-OriginalArrivalTime: 20 Aug 2010 12:17:10.0424 (UTC) FILETIME=[9D3D5980:01CB4061] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 28 On Fri, 2010-08-20 at 13:45 +0800, Wu Fengguang wrote: > > Hi Ram, > > > > I was seeing it on NFS until I put in the following kswapd-specific hack > > into nfs_release_page(): > > > > /* Only do I/O if gfp is a superset of GFP_KERNEL */ > > if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) { > > int how = FLUSH_SYNC; > > > > /* Don't let kswapd deadlock waiting for OOM RPC calls */ > > if (current_is_kswapd()) > > how = 0; > > So the patch can remove the above workaround together, and add comment > that NFS exploits the gfp mask to avoid complex operations involving > recursive memory allocation and hence deadlock? I thought I'd send that as a separate patch, but yes, that is my intention next. Cheers Trond -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/