Re: [PATCH] mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info
From: Nicolas Pitre <hidden>
Date: 2017-10-04 00:13:41
Also in:
lkml
From: Nicolas Pitre <hidden>
Date: 2017-10-04 00:13:41
Also in:
lkml
On Tue, 3 Oct 2017, Dennis Zhou wrote:
Hi Tejun, On Tue, Oct 03, 2017 at 03:36:42PM -0700, Tejun Heo wrote:quoted
quoted
Subject: [PATCH] percpu: don't forget to free the temporary struct pcpu_alloc_infoSo, 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.
That was my conclusion too (albeit not stated as clearly) and what my second patch fixed. Nicolas -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>