From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minchan Kim Subject: Re: [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long Date: Tue, 25 Sep 2012 16:34:57 +0900 Message-ID: <20120925073456.GL13234@bbox> References: <1348224383-1499-1-git-send-email-mgorman@suse.de> <1348224383-1499-5-git-send-email-mgorman@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Richard Davies , Shaohua Li , Rik van Riel , Avi Kivity , QEMU-devel , KVM , Linux-MM , LKML To: Mel Gorman Return-path: Content-Disposition: inline In-Reply-To: <1348224383-1499-5-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org On Fri, Sep 21, 2012 at 11:46:18AM +0100, Mel Gorman wrote: > From: Shaohua Li > > Changelog since V2 > o Fix BUG_ON triggered due to pages left on cc.migratepages > o Make compact_zone_order() require non-NULL arg `contended' > > Changelog since V1 > o only abort the compaction if lock is contended or run too long > o Rearranged the code by Andrea Arcangeli. > > isolate_migratepages_range() might isolate no pages if for example when > zone->lru_lock is contended and running asynchronous compaction. In this > case, we should abort compaction, otherwise, compact_zone will run a > useless loop and make zone->lru_lock is even contended. > > [minchan@kernel.org: Putback pages isolated for migration if aborting] > [akpm@linux-foundation.org: compact_zone_order requires non-NULL arg contended] > Signed-off-by: Andrea Arcangeli > Signed-off-by: Shaohua Li > Signed-off-by: Mel Gorman > Acked-by: Rik van Riel Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753459Ab2IYHby (ORCPT ); Tue, 25 Sep 2012 03:31:54 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:55260 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097Ab2IYHbx (ORCPT ); Tue, 25 Sep 2012 03:31:53 -0400 X-AuditID: 9c930179-b7bfcae0000020b4-a9-50615de7aec6 Date: Tue, 25 Sep 2012 16:34:57 +0900 From: Minchan Kim To: Mel Gorman Cc: Andrew Morton , Richard Davies , Shaohua Li , Rik van Riel , Avi Kivity , QEMU-devel , KVM , Linux-MM , LKML Subject: Re: [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long Message-ID: <20120925073456.GL13234@bbox> References: <1348224383-1499-1-git-send-email-mgorman@suse.de> <1348224383-1499-5-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1348224383-1499-5-git-send-email-mgorman@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2012 at 11:46:18AM +0100, Mel Gorman wrote: > From: Shaohua Li > > Changelog since V2 > o Fix BUG_ON triggered due to pages left on cc.migratepages > o Make compact_zone_order() require non-NULL arg `contended' > > Changelog since V1 > o only abort the compaction if lock is contended or run too long > o Rearranged the code by Andrea Arcangeli. > > isolate_migratepages_range() might isolate no pages if for example when > zone->lru_lock is contended and running asynchronous compaction. In this > case, we should abort compaction, otherwise, compact_zone will run a > useless loop and make zone->lru_lock is even contended. > > [minchan@kernel.org: Putback pages isolated for migration if aborting] > [akpm@linux-foundation.org: compact_zone_order requires non-NULL arg contended] > Signed-off-by: Andrea Arcangeli > Signed-off-by: Shaohua Li > Signed-off-by: Mel Gorman > Acked-by: Rik van Riel Acked-by: Minchan Kim -- Kind regards, Minchan Kim From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGPcf-0001Io-Hb for qemu-devel@nongnu.org; Tue, 25 Sep 2012 03:32:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGPcZ-00064u-Na for qemu-devel@nongnu.org; Tue, 25 Sep 2012 03:32:01 -0400 Received: from lgemrelse6q.lge.com ([156.147.1.121]:56812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGPcZ-00064g-DB for qemu-devel@nongnu.org; Tue, 25 Sep 2012 03:31:55 -0400 Date: Tue, 25 Sep 2012 16:34:57 +0900 From: Minchan Kim Message-ID: <20120925073456.GL13234@bbox> References: <1348224383-1499-1-git-send-email-mgorman@suse.de> <1348224383-1499-5-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1348224383-1499-5-git-send-email-mgorman@suse.de> Subject: Re: [Qemu-devel] [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mel Gorman Cc: Richard Davies , KVM , QEMU-devel , LKML , Linux-MM , Avi Kivity , Andrew Morton , Shaohua Li On Fri, Sep 21, 2012 at 11:46:18AM +0100, Mel Gorman wrote: > From: Shaohua Li > > Changelog since V2 > o Fix BUG_ON triggered due to pages left on cc.migratepages > o Make compact_zone_order() require non-NULL arg `contended' > > Changelog since V1 > o only abort the compaction if lock is contended or run too long > o Rearranged the code by Andrea Arcangeli. > > isolate_migratepages_range() might isolate no pages if for example when > zone->lru_lock is contended and running asynchronous compaction. In this > case, we should abort compaction, otherwise, compact_zone will run a > useless loop and make zone->lru_lock is even contended. > > [minchan@kernel.org: Putback pages isolated for migration if aborting] > [akpm@linux-foundation.org: compact_zone_order requires non-NULL arg contended] > Signed-off-by: Andrea Arcangeli > Signed-off-by: Shaohua Li > Signed-off-by: Mel Gorman > Acked-by: Rik van Riel Acked-by: Minchan Kim -- Kind regards, Minchan Kim