Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbdGYSEV (ORCPT ); Tue, 25 Jul 2017 14:04:21 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:37199 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbdGYSEU (ORCPT ); Tue, 25 Jul 2017 14:04:20 -0400 Date: Tue, 25 Jul 2017 14:04:18 -0400 From: Josef Bacik To: Dennis Zhou Cc: Tejun Heo , Christoph Lameter , Josef Bacik , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, Dennis Zhou Subject: Re: [PATCH v2 02/23] percpu: introduce start_offset to pcpu_chunk Message-ID: <20170725180417.GB18880@destiny> References: <20170724230220.21774-1-dennisz@fb.com> <20170724230220.21774-3-dennisz@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170724230220.21774-3-dennisz@fb.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1196 Lines: 28 On Mon, Jul 24, 2017 at 07:01:59PM -0400, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > The reserved chunk arithmetic uses a global variable > pcpu_reserved_chunk_limit that is set in the first chunk init code to > hide a portion of the area map. The bitmap allocator to come will > eventually move the base_addr up and require both the reserved chunk > and static chunk to maintain this offset. pcpu_reserved_chunk_limit is > removed and start_offset is added. > > The first chunk that is circulated and is pcpu_first_chunk serves the > dynamic region, the region following the reserved region. The reserved > chunk address check will temporarily use the first chunk to identify its > address range. A following patch will increase the base_addr and remove > this. If there is no reserved chunk, this will check the static region > and return false because those values should never be passed into the > allocator. > > Lastly, when linking in the first chunk, make sure to count the right > free region for the number of empty populated pages. > > Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Thanks, Josef