Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756385Ab3GYPK7 (ORCPT ); Thu, 25 Jul 2013 11:10:59 -0400 Received: from zene.cmpxchg.org ([85.214.230.12]:50911 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755847Ab3GYPK6 (ORCPT ); Thu, 25 Jul 2013 11:10:58 -0400 Date: Thu, 25 Jul 2013 11:10:49 -0400 From: Johannes Weiner To: Paul Bolle Cc: Rik van Riel , Andrew Morton , Mel Gorman , Andrea Arcangeli , Paul Bolle , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 3/3] mm: page_alloc: fair zone allocator policy Message-ID: <20130725151049.GM715@cmpxchg.org> References: <1374267325-22865-1-git-send-email-hannes@cmpxchg.org> <1374267325-22865-4-git-send-email-hannes@cmpxchg.org> <51ED9433.60707@redhat.com> <51F0CACE.7040609@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F0CACE.7040609@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 38 Hi Paul Bolle^W^W Sam Ben^W^W Hush Bensen^W^W Mtrr Patt^W^W Ric Mason^W^W Will Huck^W^W Simon Jeons^W^W Jaeguk Hanse^W^W Ni zhan Chen^W^W^W Wanpeng Li [ I Cc'd Paul Bolle at pebolle@tiscali.nl as well, his English was better from there ] On Thu, Jul 25, 2013 at 02:50:54PM +0800, Paul Bolle wrote: > On 07/23/2013 04:21 AM, Rik van Riel wrote: > >On 07/19/2013 04:55 PM, Johannes Weiner wrote: > > > >>@@ -1984,7 +1992,8 @@ this_zone_full: > >> goto zonelist_scan; > >> } > >> > >>- if (page) > >>+ if (page) { > >>+ atomic_sub(1U << order, &zone->alloc_batch); > >> /* > >> * page->pfmemalloc is set when ALLOC_NO_WATERMARKS was > >> * necessary to allocate the page. The expectation is > > > >Could this be moved into the slow path in buffered_rmqueue and > >rmqueue_bulk, or would the effect of ignoring the pcp buffers be > >too detrimental to keeping the balance between zones? > > > >It would be kind of nice to not have this atomic operation on every > >page allocation... > > atomic operation will lock cache line or memory bus? And cmpxchg > will lock cache line or memory bus? ;-) Sure, why not ;-) -- 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/