Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbbEYVU5 (ORCPT ); Mon, 25 May 2015 17:20:57 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:52565 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbbEYVUz (ORCPT ); Mon, 25 May 2015 17:20:55 -0400 From: Arnd Bergmann To: Jungseok Lee Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , barami97@gmail.com, Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Minchan Kim Subject: Re: [RFC PATCH 2/2] arm64: Implement vmalloc based thread_info allocator Date: Mon, 25 May 2015 23:20:45 +0200 Message-ID: <3042945.CWqRdpeSZk@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1432483340-23157-1-git-send-email-jungseoklee85@gmail.com> <5992243.NYDGjLH37z@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:XiCuXnnOo/hrxD2LL7R6ReTwNkEyefRo3y7adb+bTRUmzDeOqxQ sQOKTm5E8z9EjPjd/neI3SpRo+/qvBp/mrPKgBU0idC1F4dBa5bjgH8VXfilSxvRQFpnhLD oKkbjT2cASx5KRD9vlg90LhabOxH3/5rm6Px9mYwlrOrKbycKNqWV3pvSLlzMwBLanqFiv9 93kha8K+6ajOv8S+nbxHw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1674 Lines: 35 On Monday 25 May 2015 19:01:33 Jungseok Lee wrote: > On May 25, 2015, at 2:49 AM, Arnd Bergmann wrote: > > Could the stack size be reduced to 8KB perhaps? > > I guess probably not. > > A commit, 845ad05e, says that 8KB is not enough to cover SpecWeb benchmark. > The stack size is 16KB on x86_64. I am not sure whether all applications, > which work fine on x86_64 machine, run very well on ARM64 with 8KB stack size. A more interesting explanation is probably the one that led to x86 adopting 16kb pages, see https://lwn.net/Articles/600644 , https://lwn.net/Articles/600649/ and http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6538b8ea88 Based on that, I have to agree that lowering the size back to 8kb seems unrealistic at the moment, but at the same time, we need to actively keep working on reducing the stack size. IRQ stacks are one important point here, but in the trace that Minchan Kim has in the commit for x86-64 there is not even an interrupt. I've looked at the code that is generated by aarch64-linux-gcc-4.8 now and found that it does not try very hard to reduce the stack size, the first function I fed it end up up using 48 bytes of stack where half of that would suffice, so there is probably room for optimization within the boundaries of the ABI, possibly more if we allow kernel specific calling conventions as some other architectures have implemented in the past. Arnd -- 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/