Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750974AbdGYSYF (ORCPT ); Tue, 25 Jul 2017 14:24:05 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:34871 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbdGYSYE (ORCPT ); Tue, 25 Jul 2017 14:24:04 -0400 Date: Tue, 25 Jul 2017 14:24:02 -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 08/23] percpu: modify base_addr to be region specific Message-ID: <20170725182401.GH18880@destiny> References: <20170724230220.21774-1-dennisz@fb.com> <20170724230220.21774-9-dennisz@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170724230220.21774-9-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: 1499 Lines: 35 On Mon, Jul 24, 2017 at 07:02:05PM -0400, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > Originally, the first chunk was served by one or two chunks, each > given a region they are responsible for. Despite this, the arithmetic > was based off of the true base_addr of the chunk making it be overly > inclusive. > > This patch moves the base_addr of chunks that are responsible for the > first chunk. The base_addr must remain page aligned to keep the > address alignment correct, so it is the beginning of the region served > page aligned down. start_offset holds where the region served begins > from this new base_addr. > > The corresponding percpu address checks are modified to be more specific > as a result. The first chunk considers only the dynamic region and both > first chunk and reserved chunk checks ignore the static region. The > static region addresses should never be passed into the allocator. There > is no impact here besides distinguishing the first chunk and making the > checks specific. > > The percpu pointer to physical address is left intact as addresses are > not given out in the non-allocated portion of percpu memory. > > nr_pages is added to pcpu_chunk to keep track of the size of the entire > region served containing both start_offset and end_offset. This variable > will be used to manage the bitmap allocator. > > Signed-off-by: Dennis Zhou Reviewed-by: Josef Bacik Thanks, Josef