Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdGQXcK (ORCPT ); Mon, 17 Jul 2017 19:32:10 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:34907 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbdGQXcJ (ORCPT ); Mon, 17 Jul 2017 19:32:09 -0400 Date: Mon, 17 Jul 2017 19:32:05 -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 10/10] percpu: add optimizations on allocation path for the bitmap allocator Message-ID: <20170717233205.GD585283@devbig577.frc2.facebook.com> References: <20170716022315.19892-1-dennisz@fb.com> <20170716022315.19892-11-dennisz@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170716022315.19892-11-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: 1198 Lines: 28 On Sat, Jul 15, 2017 at 10:23:15PM -0400, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > This patch adds two optimizations to the allocation path. The first is > to not consider a chunk if the requested allocation cannot fit in the > chunk's contig_hint. The benefit is that this avoids unncessary scanning > over a chunk as the assumption is memory pressure is high and creating a > new chunk has minimal consequences. This may fail when the contig_hint > has poor alignment, but again we fall back on the high memory pressure > argument. > > The second is just a fail-fast mechanism. When allocating, a offset is > identified within a block and then scanning is used to see if it will > fit. An offset should never be returned unless it is known to fit, so > here we just bind the scanning to the size of a block. > > Signed-off-by: Dennis Zhou Looks good to me and there's nothing wrong with these two optimizations being in a separate patch but they might be too little to help reviewing / debugging in any noticeable way. It'd be great if more significant parts can be separated out. If not, this is fine too. Thanks. -- tejun