From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934082AbaFJAA1 (ORCPT ); Mon, 9 Jun 2014 20:00:27 -0400 Received: from mail-ie0-f181.google.com ([209.85.223.181]:50999 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754366AbaFJAA0 (ORCPT ); Mon, 9 Jun 2014 20:00:26 -0400 Date: Mon, 9 Jun 2014 17:00:23 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Vlastimil Babka cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Greg Thelen , Minchan Kim , Mel Gorman , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel Subject: Re: [PATCH 04/10] mm, compaction: skip rechecks when lock was already held In-Reply-To: <1402305982-6928-4-git-send-email-vbabka@suse.cz> Message-ID: References: <1402305982-6928-1-git-send-email-vbabka@suse.cz> <1402305982-6928-4-git-send-email-vbabka@suse.cz> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Jun 2014, Vlastimil Babka wrote: > Compaction scanners try to lock zone locks as late as possible by checking > many page or pageblock properties opportunistically without lock and skipping > them if not unsuitable. For pages that pass the initial checks, some properties > have to be checked again safely under lock. However, if the lock was already > held from a previous iteration in the initial checks, the rechecks are > unnecessary. > > This patch therefore skips the rechecks when the lock was already held. This is > now possible to do, since we don't (potentially) drop and reacquire the lock > between the initial checks and the safe rechecks anymore. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Cc: David Rientjes Acked-by: David Rientjes From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by kanga.kvack.org (Postfix) with ESMTP id 23F526B00CC for ; Mon, 9 Jun 2014 20:00:26 -0400 (EDT) Received: by mail-ie0-f172.google.com with SMTP id lx4so3238528iec.17 for ; Mon, 09 Jun 2014 17:00:26 -0700 (PDT) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [2607:f8b0:4001:c05::233]) by mx.google.com with ESMTPS id nm6si20713006igb.37.2014.06.09.17.00.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 17:00:25 -0700 (PDT) Received: by mail-ig0-f179.google.com with SMTP id r2so2553319igi.12 for ; Mon, 09 Jun 2014 17:00:25 -0700 (PDT) Date: Mon, 9 Jun 2014 17:00:23 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH 04/10] mm, compaction: skip rechecks when lock was already held In-Reply-To: <1402305982-6928-4-git-send-email-vbabka@suse.cz> Message-ID: References: <1402305982-6928-1-git-send-email-vbabka@suse.cz> <1402305982-6928-4-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Greg Thelen , Minchan Kim , Mel Gorman , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel On Mon, 9 Jun 2014, Vlastimil Babka wrote: > Compaction scanners try to lock zone locks as late as possible by checking > many page or pageblock properties opportunistically without lock and skipping > them if not unsuitable. For pages that pass the initial checks, some properties > have to be checked again safely under lock. However, if the lock was already > held from a previous iteration in the initial checks, the rechecks are > unnecessary. > > This patch therefore skips the rechecks when the lock was already held. This is > now possible to do, since we don't (potentially) drop and reacquire the lock > between the initial checks and the safe rechecks anymore. > > Signed-off-by: Vlastimil Babka > Cc: Minchan Kim > Cc: Mel Gorman > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Cc: David Rientjes Acked-by: David Rientjes -- 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