Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753425AbaKRDIy (ORCPT ); Mon, 17 Nov 2014 22:08:54 -0500 Received: from lgeamrelo01.lge.com ([156.147.1.125]:58013 "EHLO lgeamrelo01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbaKRDIw (ORCPT ); Mon, 17 Nov 2014 22:08:52 -0500 X-Original-SENDERIP: 10.177.222.213 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 18 Nov 2014 12:11:26 +0900 From: Joonsoo Kim To: Mel Gorman Cc: Weijie Yang , Andrew Morton , "Kirill A. Shutemov" , Rik van Riel , Peter Zijlstra , Johannes Weiner , Minchan Kim , Yasuaki Ishimatsu , Zhang Yanfei , Tang Chen , Naoya Horiguchi , Bartlomiej Zolnierkiewicz , Wen Congyang , Marek Szyprowski , Michal Nazarewicz , Laura Abbott , Heesub Shin , "Aneesh Kumar K.V" , Ritesh Harjani , t.stanislaws@samsung.com, Gioh Kim , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v5 1/4] mm/page_alloc: fix incorrect isolation behavior by rechecking migratetype Message-ID: <20141118031125.GA12197@js1304-P5Q-DELUXE> References: <1414740330-4086-1-git-send-email-iamjoonsoo.kim@lge.com> <1414740330-4086-2-git-send-email-iamjoonsoo.kim@lge.com> <20141114103301.GD21422@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141114103301.GD21422@suse.de> 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 Fri, Nov 14, 2014 at 10:33:01AM +0000, Mel Gorman wrote: > > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > > index 4593567..3d090af 100644 > > > --- a/include/linux/mmzone.h > > > +++ b/include/linux/mmzone.h > > > @@ -431,6 +431,15 @@ struct zone { > > > */ > > > int nr_migrate_reserve_block; > > > > > > +#ifdef CONFIG_MEMORY_ISOLATION > > > + /* > > > + * Number of isolated pageblock. It is used to solve incorrect > > > + * freepage counting problem due to racy retrieving migratetype > > > + * of pageblock. Protected by zone->lock. > > > + */ > > > + unsigned long nr_isolate_pageblock; > > > +#endif > > > + > > > > First sorry for this deferred reply, I see these patches have been merged > > into the mainline. > > However, I still have a tiny question: > > Why use ZONE_PADDING(_pad1_) seperate it and zone->lock? > > How about move it to the same cacheline with zone->lock, because it is > > accessed under zone->lock? > > > > zone->lock is currently sharing lines with the data that is frequently > updated under zone lock and some of the dirty data cache line bouncing has > completed when the lock is acquired. nr_isolate_pageblock is a read-mostly > field and in some cases will never be used. It's fine where it is beside > other read-mostly fields. > My bad... I don't remember why I decide that place. :/ It seems better to move nr_isolate_pageblock to the same cacheline with zone->lock, but, as Mel said, it is rarely used field so improvement would be marginal. Thanks. -- 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/