From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbdJCXse (ORCPT ); Tue, 3 Oct 2017 19:48:34 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:46942 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbdJCXsd (ORCPT ); Tue, 3 Oct 2017 19:48:33 -0400 X-Google-Smtp-Source: AOwi7QD9QbnXaeZZhK7dbUq6GwvpNLr6jfwxa2G9t7pz430An1upqb9SJrM3+HvfTlifOMXTiR1YNg== Date: Tue, 3 Oct 2017 18:48:28 -0500 From: Dennis Zhou To: Tejun Heo Cc: Nicolas Pitre , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info Message-ID: <20171003234801.GA1571@Big-Sky.local> References: <20171003210540.GM3301751@devbig577.frc2.facebook.com> <20171003223642.GN3301751@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171003223642.GN3301751@devbig577.frc2.facebook.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun, On Tue, Oct 03, 2017 at 03:36:42PM -0700, Tejun Heo wrote: > > Subject: [PATCH] percpu: don't forget to free the temporary struct pcpu_alloc_info > > So, IIRC, the error path is either boot fail or some serious bug in > arch code. It really doesn't matter whether we free a page or not. > In setup_per_cpu_area, a call to either pcpu_embed_first_chunk, pcpu_page_first_chunk, or pcpu_setup_first_chunk is made. The first two eventually call pcpu_setup_first_chunk with a pairing call to pcpu_free_alloc_info right after. This occurs in all implementations. It happens we don't have a pairing call to pcpu_free_alloc_info in the UP setup_per_cpu_area. Thanks, Dennis