Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751474AbdGQT0b (ORCPT ); Mon, 17 Jul 2017 15:26:31 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:34020 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbdGQT0J (ORCPT ); Mon, 17 Jul 2017 15:26:09 -0400 Date: Mon, 17 Jul 2017 15:26:02 -0400 From: Tejun Heo To: Dennis Zhou Cc: Christoph Lameter , kernel-team@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dennis Zhou Subject: Re: [PATCH 08/10] percpu: change the number of pages marked in the first_chunk bitmaps Message-ID: <20170717192602.GB585283@devbig577.frc2.facebook.com> References: <20170716022315.19892-1-dennisz@fb.com> <20170716022315.19892-9-dennisz@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170716022315.19892-9-dennisz@fb.com> 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: 1616 Lines: 38 Hello, On Sat, Jul 15, 2017 at 10:23:13PM -0400, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > This patch changes the allocator to only mark allocated pages for the > region the population bitmap is used for. Prior, the bitmap was marked > completely used as the first chunk was allocated and immutable. This is > misleading because the first chunk may not be completely filled. > Additionally, with moving the base_addr up in the previous patch, the > population map no longer corresponds to what is being checked. This in isolation makes sense although the rationale isn't clear from the description. Is it a mere cleanup or is this needed to enable further changes? > pcpu_nr_empty_pop_pages is used to ensure there are a handful of free > pages around to serve atomic allocations. A new field, nr_empty_pop_pages, > is added to the pcpu_chunk struct to keep track of the number of empty > pages. This field is needed as the number of empty populated pages is > globally kept track of and deltas are used to update it. This new field > is exposed in percpu_stats. But I can't see why this is being added or why this is in the same patch with the previous change. > Now that chunk->nr_pages is the number of pages the chunk is serving, it > is nice to use this in the work function for population and freeing of > chunks rather than use the global variable pcpu_unit_pages. The same goes for the above part. It's fine to collect misc changes into a patch when they're trivial and related in some ways but the content of this patch seems a bit random. Thanks. -- tejun