From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbaEHFQB (ORCPT ); Thu, 8 May 2014 01:16:01 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:59852 "EHLO lgemrelse7q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751068AbaEHFQA (ORCPT ); Thu, 8 May 2014 01:16:00 -0400 X-Original-SENDERIP: 10.177.220.145 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Thu, 8 May 2014 14:17:48 +0900 From: Joonsoo Kim To: David Rientjes Cc: Andrew Morton , Mel Gorman , Rik van Riel , Vlastimil Babka , Greg Thelen , Hugh Dickins , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v3 6/6] mm, compaction: terminate async compaction when rescheduling Message-ID: <20140508051747.GA9161@js1304-P5Q-DELUXE> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 06, 2014 at 07:22:52PM -0700, David Rientjes wrote: > Async compaction terminates prematurely when need_resched(), see > compact_checklock_irqsave(). This can never trigger, however, if the > cond_resched() in isolate_migratepages_range() always takes care of the > scheduling. > > If the cond_resched() actually triggers, then terminate this pageblock scan for > async compaction as well. Hello, I think that same logic would be helpful to cond_resched() in isolatate_freepages(). And, isolate_freepages() doesn't have exit logic when it find zone_lock contention. I think that fixing it is also helpful. Thanks.