Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471AbbKBSLh (ORCPT ); Mon, 2 Nov 2015 13:11:37 -0500 Received: from resqmta-ch2-07v.sys.comcast.net ([69.252.207.39]:60613 "EHLO resqmta-ch2-07v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753024AbbKBSLe (ORCPT ); Mon, 2 Nov 2015 13:11:34 -0500 Date: Mon, 2 Nov 2015 12:11:33 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Catalin Marinas cc: mark.rutland@arm.com, Jungseok Lee , linux-mm@kvack.org, barami97@gmail.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, takahiro.akashi@linaro.org, james.morse@arm.com, tj@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 2/3] percpu: add PERCPU_ATOM_SIZE for a generic percpu area setup In-Reply-To: <20151102173520.GC7637@e104818-lin.cambridge.arm.com> Message-ID: References: <1446363977-23656-1-git-send-email-jungseoklee85@gmail.com> <1446363977-23656-3-git-send-email-jungseoklee85@gmail.com> <20151102162236.GB7637@e104818-lin.cambridge.arm.com> <20151102173520.GC7637@e104818-lin.cambridge.arm.com> Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 29 On Mon, 2 Nov 2015, Catalin Marinas wrote: > On Mon, Nov 02, 2015 at 10:48:17AM -0600, Christoph Lameter wrote: > > On Mon, 2 Nov 2015, Catalin Marinas wrote: > > > I haven't looked at the patch 3/3 in detail but I'm pretty sure I'll NAK > > > the approach (and the definition of PERCPU_ATOM_SIZE), therefore > > > rendering this patch unnecessary. IIUC, this is used to enforce some > > > alignment of the per-CPU IRQ stack to be able to check whether the > > > current stack is process or IRQ on exception entry. But there are other, > > > less intrusive ways to achieve the same (e.g. x86). > > > > The percpu allocator allows the specification of alignment requirements. > > Patch 3/3 does something like this: > > DEFINE_PER_CPU(char [IRQ_STACK_SIZE], irq_stacks) __aligned(IRQ_STACK_SIZE) > > where IRQ_STACK_SIZE > PAGE_SIZE. AFAICT, setup_per_cpu_areas() doesn't > guarantee alignment greater than PAGE_SIZE. And we cannot use percpu_alloc() instead? Aligning the whole of the percpu area because one allocation requires it? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/