Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752333AbbLPFnH (ORCPT ); Wed, 16 Dec 2015 00:43:07 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:53570 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbbLPFnE (ORCPT ); Wed, 16 Dec 2015 00:43:04 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Wed, 16 Dec 2015 14:44:45 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , Aaron Lu , Mel Gorman , Rik van Riel , David Rientjes , LKML , Linux Memory Management List Subject: Re: [PATCH 1/2] mm/compaction: fix invalid free_pfn and compact_cached_free_pfn Message-ID: <20151216054445.GB13808@js1304-P5Q-DELUXE> References: <1450069341-28875-1-git-send-email-iamjoonsoo.kim@lge.com> <566E94C6.5080000@suse.cz> <566FCFEB.1020305@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <566FCFEB.1020305@suse.cz> 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 Content-Length: 1652 Lines: 40 On Tue, Dec 15, 2015 at 09:31:39AM +0100, Vlastimil Babka wrote: > On 12/14/2015 04:26 PM, Joonsoo Kim wrote: > >2015-12-14 19:07 GMT+09:00 Vlastimil Babka : > >>On 12/14/2015 06:02 AM, Joonsoo Kim wrote: > >>> > >> > >>Acked-by: Vlastimil Babka > >> > >>Note that until now in compaction we've used basically an open-coded > >>round_down(), and ALIGN() for rounding up. You introduce a first use of > >>round_down(), and it would be nice to standardize on round_down() and > >>round_up() everywhere. I think it's more obvious than open-coding and > >>ALIGN() (which doesn't tell the reader if it's aligning up or down). > >>Hopefully they really do the same thing and there are no caveats... > > > >Okay. Will send another patch for this clean-up on next spin. > > Great, I didn't mean that the cleanup is needed right now, but > whether we agree on an idiom to use whenever doing any changes from > now on. Okay. > Maybe it would be best to add some defines in the top of > compaction.c that would also hide away the repeated > pageblock_nr_pages everywhere? Something like: > > #define pageblock_start(pfn) round_down(pfn, pageblock_nr_pages) > #define pageblock_end(pfn) round_up((pfn)+1, pageblock_nr_pages) Quick grep shows that there are much more places this new define or some variant can be used. It would be good clean-up. I will try it separately. 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/