From patchwork Wed Jan 9 13:37:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 210712 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 994642C0358 for ; Thu, 10 Jan 2013 00:38:11 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757845Ab3AINhw (ORCPT ); Wed, 9 Jan 2013 08:37:52 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47111 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757764Ab3AINhv (ORCPT ); Wed, 9 Jan 2013 08:37:51 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 75D6AA3A78; Wed, 9 Jan 2013 14:37:49 +0100 (CET) Date: Wed, 9 Jan 2013 13:37:46 +0000 From: Mel Gorman To: Eric Wong Cc: linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rik van Riel , Minchan Kim , Eric Dumazet , Andrew Morton , Linus Torvalds Subject: Re: ppoll() stuck on POLLIN while TCP peer is sending Message-ID: <20130109133746.GD13304@suse.de> References: <20121228014503.GA5017@dcvr.yhbt.net> <20130102200848.GA4500@dcvr.yhbt.net> <20130104160148.GB3885@suse.de> <20130106120700.GA24671@dcvr.yhbt.net> <20130107122516.GC3885@suse.de> <20130107223850.GA21311@dcvr.yhbt.net> <20130108224313.GA13304@suse.de> <20130108232325.GA5948@dcvr.yhbt.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130108232325.GA5948@dcvr.yhbt.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 08, 2013 at 11:23:25PM +0000, Eric Wong wrote: > Mel Gorman wrote: > > Please try the following patch. However, even if it works the benefit of > > capture may be so marginal that partially reverting it and simplifying > > compaction.c is the better decision. > > I already got my VM stuck on this one. I had two twosleepy instances, > 2774 was the one that got stuck (also confirmed by watching top). > page->pfmemalloc can be left set for captured pages so try this but as capture is rarely used I'm strongly favouring a partial revert even if this works for you. I haven't reproduced this using your workload yet but I have found that high-order allocation stress tests for 3.8-rc2 are completely screwed. 71% success rates at rest in 3.7 and 6% in 3.8-rc2 so I have to chase that down too. --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9d20c13..c242d21 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2180,8 +2180,10 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, current->flags &= ~PF_MEMALLOC; /* If compaction captured a page, prep and use it */ - if (page && !prep_new_page(page, order, gfp_mask)) + if (page && !prep_new_page(page, order, gfp_mask)) { + page->pfmemalloc = false; goto got_page; + } if (*did_some_progress != COMPACT_SKIPPED) { /* Page migration frees to the PCP lists but we want merging */